-
Notifications
You must be signed in to change notification settings - Fork 4
/
Makefile
106 lines (88 loc) · 2.35 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
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
help:
@echo "clean - clean build, pyc, test, coverage"
@echo "clean-all - clean build, pyc, test, coverage, eggs"
@echo "clean-build - remove build artifacts"
@echo "clean-pyc - remove Python file artifacts"
@echo "clean-test - remove pytest cache"
@echo "clean-cov - remove coverage artifacts"
@echo "clean-eggs - remove cached eggs"
@echo "build - build so file from pyx"
@echo "install - install implements and dependencies"
@echo "install-all - install implements, dependencies and dev packages"
@echo "lint - check style with flake8"
@echo "test - run tests quickly with the default Python"
@echo "test-all - run tests on every Python version with tox"
@echo "version - show package version"
@echo "coverage - check code coverage quickly with the default Python"
@echo "docs - generate Sphinx HTML documentation, including API docs"
@echo "release - package and upload a release"
@echo "dist - package"
.PHONY: clean
clean: clean-build clean-pyc clean-test clean-cov
.PHONY: clean
clean-all: clean clean-eggs
.PHONY: clean-build
clean-build:
rm -rf build/
rm -rf dist/
rm -rf *.egg-info
.PHONY: clean-pyc
clean-pyc:
find . -name '*.pyc' -exec rm -f {} +
find . -name '*.pyo' -exec rm -f {} +
find . -name '*~' -exec rm -f {} +
.PHONY: clean-test
clean-test:
rm -rf __pycache__/
rm -rf .pytest_cache/
.PHONY: clean-cov
clean-cov:
rm -f .coverage
rm -rf htmlcov/
.PHONY: clean-eggs
clean-eggs:
rm -rf .eggs/
.PHONY: build
build: clean-build clean-eggs
python3 setup.py build_ext --inplace
.PHONY: install
install: clean-build clean-eggs
python3 setup.py install
.PHONY: install-all
install-all:
pip install -e .[all_packages]
.PHONY: lint
lint:
pytest --flake8 implements.py tests.py
.PHONY: test
test:
python3 setup.py test
.PHONY: test-all
test-all:
tox
.PHONY: version
version:
python3 setup.py --version
.PHONY: coverage
coverage:
coverage run --source implements setup.py test
coverage report -m
coverage html
xdg-open htmlcov/index.html
.PHONY: docs
docs:
rm -f docs/implements.rst
rm -f docs/modules.rst
sphinx-apidoc -o docs/ implements
$(MAKE) -C docs clean
$(MAKE) -C docs html
xdg-open docs/_build/html/index.html
.PHONY: release
release: clean build
python3 setup.py sdist bdist_wheel
twine check dist/*
twine upload --verbose dist/*
.PHONY: dist
dist: clean build
python3 setup.py sdist bdist_wheel
twine check dist/*