-
-
Notifications
You must be signed in to change notification settings - Fork 97
/
Copy pathMakefile
41 lines (32 loc) · 1.09 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
.PHONY: help clean clean-build clean-pyc clean-test
.DEFAULT_GOAL := help
# AutoDoc
define PRINT_HELP_PYSCRIPT
import re, sys
for line in sys.stdin:
match = re.match(r'^([a-zA-Z_-]+):.*?## (.*)$$', line)
if match: print("%-20s %s" % (match.groups()))
endef
export PRINT_HELP_PYSCRIPT
help:
@python -c "$$PRINT_HELP_PYSCRIPT" < $(MAKEFILE_LIST)
require-%:
$(if $(shell command -v $* 2> /dev/null), , $(error Please install `$*` ***))
clean: ## remove all build, test, coverage and Python artifacts
rm -rf build dist .eggs .cache .tox .coverage htmlcov coverage-reports
find . -name '*.egg-info' -exec rm -fr {} +
find . -name '*.egg' -exec rm -f {} +
find . -name '*.pyc' -exec rm -f {} +
find . -name '*.pyo' -exec rm -f {} +
find . -name '*~' -exec rm -f {} +
find . -name '__pycache__' -exec rm -fr {} +
wipe: ## remove all files and changes not tracked in CVS
@git clean -f
.PHONY: test
test: install-dev ## run tests quickly with the default Python
@pipenv run py.test
.PHONY: upload-pypi
upload-pypi:
pip install --upgrade pip setuptools wheel
pip install twine
sh deploy/pypi_upload.sh