forked from fish2000/CLU
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathMakefile
More file actions
120 lines (80 loc) · 2.53 KB
/
Makefile
File metadata and controls
120 lines (80 loc) · 2.53 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
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
PROJECT_NAME = clu
CLU_REPL_SCRIPT = $(PROJECT_BASE)/$(PROJECT_NAME)/scripts/repl.py
clean: clean-cython clean-build-artifacts clean-pyc
distclean: clean-cython clean-test-artifacts clean-build-artifacts
rebuild: clean-build-artifacts cython
upload: clean-build-artifacts changelog bump twine-upload
git push
bigupload: clean-build-artifacts changelog bigbump twine-upload
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 -m setup build_ext --inplace
sdist:
python -m build
wheel:
python -m build -w
twine-upload: sdist
twine upload -s $(PROJECT_BASE)/dist/*
bump:
bump-my-version bump patch --verbose
bigbump:
bump-my-version bump minor --verbose
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
git addremove .
git commit -m "[make] Changelog updated @ $(shell git rev-parse --short HEAD)"
repl:
python -m bpython --config=$(PROJECT_ROOT)/.config/bpython/config.py3 -i $(CLU_REPL_SCRIPT)
ipy:
python -m IPython --autoindent --pylab --colors=LightBG --config=$(PROJECT_ROOT)/.config/ipython/config3.py -i $(CLU_REPL_SCRIPT)
ptpy:
python -m ptpython -i $(CLU_REPL_SCRIPT)
# this loads the system IPython, not the virtualenv:
ptipy:
ptipython -i $(CLU_REPL_SCRIPT)
coverage:
python -m pytest -p pytest_cov --cov=$(PROJECT_NAME) tests/
.PHONY: clean distclean rebuild
.PHONY: 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