-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile
95 lines (60 loc) · 1.53 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
#
source_dir := ./src
tests_dir := ./test
.DEFAULT_GOAL := develop
.PHONY: develop
develop:
python3 setup.py develop
.PHONY: package
package: sdist wheel pex
.PHONY: sdist
sdist:
python3 setup.py sdist
python3 -m twine check dist/*.tar.gz
.PHONY: wheel
wheel:
python3 setup.py bdist_wheel
python3 -m twine check dist/*.whl
.PHONY: pex
pex:
python3 setup.py bdist_pex
.PHONY: check
check:
python3 setup.py check
.PHONY: lint
lint:
python3 -m pytest --pycodestyle --pylint -m 'pycodestyle or pylint'
.PHONY: pycodestyle
pycodestyle:
python3 -m pytest --pycodestyle -m pycodestyle
.PHONY: pylint
pylint:
python3 -m pytest --pylint -m pylint
.PHONY: test
test: pytest
.PHONY: pytest
pytest:
python3 -m pytest
.PHONY: review
review: check
python3 -m pytest --pycodestyle --pylint
.PHONY: clean
clean:
$(RM) --recursive ./.eggs/
$(RM) --recursive ./.pytest_cache/
$(RM) --recursive ./build/
$(RM) --recursive ./dist/
$(RM) --recursive ./__pycache__/
find $(source_dir) -name '*.dist-info' -type d -exec $(RM) --recursive {} +
find $(source_dir) -name '*.egg-info' -type d -exec $(RM) --recursive {} +
find $(source_dir) -name '*.pyc' -type f -exec $(RM) {} +
find $(tests_dir) -name '*.pyc' -type f -exec $(RM) {} +
find $(source_dir) -name '__pycache__' -type d -exec $(RM) --recursive {} +
find $(tests_dir) -name '__pycache__' -type d -exec $(RM) --recursive {} +
#
# Options
#
# Disable default rules and suffixes (improve speed and avoid unexpected behaviour)
MAKEFLAGS := --no-builtin-rules
.SUFFIXES:
# EOF