-
Notifications
You must be signed in to change notification settings - Fork 16
/
Makefile
52 lines (39 loc) · 1.3 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
all: check-style test
uninstall:
pip freeze | grep -v "^-e" | xargs pip uninstall -y
install:
pip install --upgrade pip setuptools twine wheel
pip install --editable .[test] --upgrade
clean:
rm -rf build dist
find . -name '*.mo' | xargs rm -rf
find . -name '*.pyc' | xargs rm -rf
find . -name '__pycache__' | xargs rm -rf
check-syntax-errors:
python -m compileall -q .
check-scripts:
@# Do not analyse .gitignored files.
@# `make` needs `$$` to output `$`. Ref: http://stackoverflow.com/questions/2382764.
shellcheck `git ls-files | grep "\.sh$$"`
check-style:
@# Do not analyse .gitignored files.
@# `make` needs `$$` to output `$`. Ref: http://stackoverflow.com/questions/2382764.
flake8 `git ls-files | grep "\.py$$"`
format-style:
@# Do not analyse .gitignored files.
@# `make` needs `$$` to output `$`. Ref: http://stackoverflow.com/questions/2382764.
autopep8 `git ls-files | grep "\.py$$"`
test: clean check-syntax-errors
pytest --ignore=tests/erfs_fpr/integration --ignore=tests/pote/
test-local: clean check-syntax-errors
pytest
archive: clean
git archive HEAD --format=zip > archive.zip
ctags:
ctags --recurse=yes .
bump:
bumpver update --patch
build:
python3 -m pip install --upgrade build twine
python3 -m build
find dist -name "*.whl" -exec pip install --force-reinstall {}[test] \;