-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathMakefile
125 lines (85 loc) · 2.49 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
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
PROJECT_NAME = clu
clean: clean-cython clean-build-artifacts clean-pyc
distclean: clean-cython clean-test-artifacts clean-build-artifacts
rebuild: clean-build-artifacts cython
dist: twine-upload
upload: clean-build-artifacts bump dist
# git pushex
git push
bigupload: clean-build-artifacts bigbump dist
# git pushex
git push
clean-pyc:
find $(PROJECT_BASE) -name \*.pyc -print -delete
clean-cython:
find $(PROJECT_BASE) -name \*.so -print -delete
clean-build-artifacts:
rm -rf build dist python_$(PROJECT_NAME).egg-info
clean-test-artifacts:
rm -rf $(PROJECT_ROOT)/.pytest_cache \
$(PROJECT_BASE)/.pytest_cache \
$(PROJECT_BASE)/.nox
clean-type-caches:
rm -rf $(PROJECT_VENV)/var/cache/mypy_cache
rm -rf $(PROJECT_VENV)/var/cache/pytype
cython:
python setup.py build_ext --inplace
sdist:
python setup.py sdist
wheel:
python setup.py bdist_wheel
twine-upload: cython sdist wheel
twine upload -s $(PROJECT_BASE)/dist/*
bump:
bump2version --verbose patch
bigbump:
bump2version --verbose minor
check: clean-test-artifacts
check-manifest -v
travis lint .travis.yml
mypy:
mypy --config-file mypy.ini
pytype:
pytype --config pytype.cfg --verbosity=2
pytest:
python -m pytest -p clu.testing.pytest
nox:
nox --report $(PROJECT_BASE)/.noxresults.json
renox: clean-test-artifacts nox
test: check pytest
test-all: check nox
test-configuration:
python -m pytest --setup-plan --trace-config | pygmentize -l clean -O "style=vim"
version:
python -m clu.version
consts:
python -m clu.constants
modules:
python -m clu
remove-changelog:
rm -f CHANGELOG.md
changelog: remove-changelog
gitchangelog > CHANGELOG.md
repl:
python -m bpython --config=$(PROJECT_ROOT)/.config/bpython/config.py3 \
-i $(PROJECT_BASE)/clu/scripts/repl.py
ipy:
python -m IPython --autoindent --pylab --colors=LightBG \
--config=$(PROJECT_ROOT)/.config/ipython/config3.py \
-i $(PROJECT_BASE)/clu/scripts/repl.py
ptpy:
python -m ptpython -i $(PROJECT_BASE)/clu/scripts/repl.py
# this loads the system IPython, not the virtualenv:
ptipy:
ptipython -i $(PROJECT_BASE)/clu/scripts/repl.py
coverage:
python -m pytest -p pytest_cov --cov=$(PROJECT_NAME) tests/
.PHONY: clean distclean rebuild
.PHONY: dist upload bigupload
.PHONY: clean-pyc clean-cython
.PHONY: clean-build-artifacts clean-test-artifacts clean-pytest-artifacts
.PHONY: cython sdist wheel twine-upload bump bigbump
.PHONY: check pytest nox renox
.PHONY: test test-all
.PHONY: version consts-old modules-old consts modules
.PHONY: repl ipy ptpy ptipy