-
Notifications
You must be signed in to change notification settings - Fork 9
/
Makefile
62 lines (48 loc) · 1.58 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
.PHONY: all clean clean-build clean-pyc clean-test lint test test-quick test-example test-all coverage dist
help:
@echo "all Lint, test, check coverage and package"
@echo "clean Remove all build, test, coverage and Python artifacts"
@echo "clean-build Remove build artifacts"
@echo "clean-pyc Remove Python file artifacts"
@echo "clean-test Remove test and coverage artifacts"
@echo "lint Check style with Flake8 and Pylint"
@echo "test Run quick tests and those for the example code"
@echo "test-quick Run tests quickly (main code only)with Python 3.11"
@echo "test-example Run tests for the example code"
@echo "test-all Run tests on every Python version with tox and the example"
@echo "coverage Check code coverage quickly with Python 3"
@echo "dist Package"
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/
all: lint test-all coverage dist
lint:
tox -e lint
test: test-example | test-quick
test-quick:
tox -e py311
test-all: test-example | test-all-env
test-all-env:
tox
test-example:
tox -e examples
coverage:
tox -e coverage
command -v xdg-open && xdg-open htmlcov/index.html || true
dist: clean
python3 setup.py sdist
python3 setup.py bdist_wheel
ls -l dist