-
Notifications
You must be signed in to change notification settings - Fork 8
/
Makefile
73 lines (51 loc) · 1.48 KB
/
Makefile
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
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
ifeq ($(OS),Windows_NT)
SHELL=cmd.exe
else
SHELL=/bin/bash
endif
test: lint install integrationtests unittests
coverage combine
rm -f .coverage.*
unittests:
coverage run -p --source=hca -m unittest discover -v -t . -s test/unit
unit: lint install unittests
coverage combine
rm -f .coverage.*
integrationtests:
# https://github.com/HumanCellAtlas/dcp-cli/issues/127
coverage run -p --source=hca -m unittest discover -v -t . -s test/integration/upload
coverage run -p --source=hca -m unittest discover -v -t . -s test/integration/dss
integration: lint install integrationtests
coverage combine
rm -f .coverage.*
lint:
python ./setup.py flake8
version: hca/version.py
hca/version.py: setup.py
echo "__version__ = '$$(python setup.py --version)'" > $@
build: version
-rm -rf dist
python setup.py bdist_wheel
install: clean build
pip install --upgrade dist/*.whl
init_docs:
cd docs; sphinx-quickstart
docs:
$(MAKE) -C docs html
clean:
-rm -rf build dist
-rm -rf *.egg-info
build-win:
rmdir /s /q dist 2>nul & exit 0
python .\setup.py bdist_wheel
clean-win:
rmdir /s /q build 2>nul & exit 0
rmdir /s /q dist 2>nul & exit 0
for %%f in (*.egg-info) do rmdir /s /q %%f 2>nul & exit 0
install-win: clean-win build-win
for %%f in (dist\*.whl) do pip install --upgrade %%f
test-win: lint install-win unittests integrationtests
coverage combine
for %%f in (.coverage.*) do del %%f 2>nul exit 0
.PHONY: test unit integration lint install release docs clean
include common.mk