File: Makefile

package info (click to toggle)
python-hdf4 0.11.6-2
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 1,328 kB
  • sloc: ansic: 9,252; python: 3,445; makefile: 192
file content (43 lines) | stat: -rw-r--r-- 772 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
PYTHON = python

.PHONY: all
all: build

.PHONY: build
build:
	make -C pyhdf build
	$(PYTHON) -m build

.PHONY: install
install: build
	$(PYTHON) -m pip install .

.PHONY: builddoc
.ONESHELL:
builddoc:
	export PYTHONPATH=$(shell pwd)
	$(PYTHON) install -e .
	make -C doc clean
	make -C doc html
	@echo
	@echo doc index is doc/_build/html/index.html

.PHONY: clean
test:
	$(PYTHON) -m pip install -e .
	pytest
	$(PYTHON) examples/runall.py

.PHONY: clean
clean:
	rm -rf build/ dist/ pyhdf.egg-info examples/*/*.hdf
	make -C pyhdf clean
	make -C doc clean

.PHONY: dist
dist:
	$(PYTHON) -m build
	@echo Upload to test site:
	@echo $(PYTHON) -m twine upload --repository-url https://test.pypi.org/legacy/ dist/*
	@echo Upload to PyPI:
	@echo $(PYTHON) -m twine upload dist/*