-
Notifications
You must be signed in to change notification settings - Fork 39
/
Copy pathMakefile
50 lines (37 loc) · 1.13 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
## Standard makefile for Python tests
BASE_PACKAGE = pcapng
.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 --pycodestyle --cov=$(BASE_PACKAGE) --cov-report=term-missing ./tests
test: check
setup_tests:
pip install pytest pytest-pycodestyle pytest-cov
docs:
$(MAKE) -C docs html
publish_docs: docs
ghp-import -n -p ./docs/build/html
@echo
@echo "HTML output published on github-pages"