-
Notifications
You must be signed in to change notification settings - Fork 3
/
Copy pathMakefile
54 lines (40 loc) · 1.22 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
## Standard makefile for Python tests
BASE_PACKAGE = jobcontrol
.PHONY: all upload
all: help
help:
@echo "AVAILABLE TARGETS"
@echo "----------------------------------------"
@echo "pypi_upload - build source distribution and upload to pypi"
@echo "pypi_register - register proejct on pypi"
@echo
@echo "install - install project in production mode"
@echo "install_dev - install project in development mode"
@echo
@echo "check (or 'test') - run tests"
@echo "setup_tests - install dependencies for tests"
@echo
@echo "docs - build documentation (HTML)"
@echo "publish_docs - publish documentation to GitHub pages"
pypi_register:
python setup.py register -r https://pypi.python.org/pypi
pypi_upload:
python setup.py sdist upload -r https://pypi.python.org/pypi
install:
python setup.py install
install_dev:
python setup.py develop
check:
py.test -vvv --pep8 --cov=$(BASE_PACKAGE) --cov-report=term-missing ./tests
test: check
setup_tests:
pip install pytest pytest-pep8 pytest-cov
clean_coverage_report:
rm -f .coverage .coverage.*
docs:
$(MAKE) -C docs html
publish_docs: docs
rsync -av --delete ./docs/build/html/ ./website/docs/
ghp-import -n -p ./website/
@echo
@echo "HTML output published on github-pages"