-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathMakefile
More file actions
74 lines (60 loc) · 1.84 KB
/
Copy pathMakefile
File metadata and controls
74 lines (60 loc) · 1.84 KB
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
73
74
.PHONY: clean clean-test clean-pyc clean-build docs dist
.DEFAULT_GOAL := help
init:
pip install pipenv --upgrade
pipenv install --dev --skip-lock
help:
@echo make init
@echo prepare development environment, use only once
@echo make clean
@echo remove all build, test, coverage and python artifacts
@echo make ci
@echo run tests quickly with the default Python
@echo make test-all
@echo run tests on every Python version with detox
@echo make lint
@echo check style with flake8
@echo make coverage
@echo check code coverage quickly with the default Python
@echo make release
@echo package and upload a release
@echo make dist
@echo builds source and wheel package
@echo make install
@echo install the package to the active Python's site-packages
clean: clean-build clean-pyc clean-test
clean-build:
rm -fr build/
rm -fr dist/
rm -fr .eggs/
find . -name '*.egg-info' -exec rm -fr {} +
find . -name '*.egg' -exec rm -f {} +
clean-pyc:
find . -name '*.pyc' -exec rm -f {} +
find . -name '*.pyo' -exec rm -f {} +
find . -name '*~' -exec rm -f {} +
find . -name '__pycache__' -exec rm -fr {} +
clean-test:
rm -fr .tox/
rm -f .coverage
rm -fr htmlcov/
rm -fr .pytest_cache
lint:
pipenv run flake8 --exclude=.tox,*.egg,build,data,*/{{*}}/* .
pipenv-install: ## install the package to pipenv for test
pipenv run python setup.py -q install
ci: pipenv-install
pipenv run py.test -n 8 --junitxml=report.xml
test-all:
pipenv run detox
coverage: pipenv-install
pipenv run py.test --cov-config .coveragerc --verbose --cov-report term --cov-report xml --cov=pycake tests
release: lint dist
pip install --upgrade twine
twine check dist/*
twine upload dist/*
dist:
pipenv run python setup.py sdist
pipenv run python setup.py bdist_wheel
install: clean
python setup.py install