Debian Codegraph @

Makefile

raw
1 # Bottleneck Makefile
2
3 PYTHON=python
4
5 srcdir := bottleneck
6
7 help:
8 @echo "Available tasks:"
9 @echo "help --> This help page"
10 @echo "all --> clean, build, flake8, test"
11 @echo "build --> Build the Python C extensions"
12 @echo "clean --> Remove all the build files for a fresh start"
13 @echo "test --> Run unit tests"
14 @echo "flake8 --> Check for pep8 errors"
15 @echo "readme --> Update benchmark results in README.rst"
16 @echo "bench --> Run performance benchmark"
17 @echo "detail --> Detailed benchmarks for all functions"
18 @echo "sdist --> Make source distribution"
19 @echo "doc --> Build Sphinx manual"
20 @echo "pypi --> Upload to pypi"
21
22 all: clean build test flake8
23
24 build:
25 ${PYTHON} setup.py build_ext --inplace
26
27 test:
28 ${PYTHON} -c "import bottleneck;bottleneck.test()"
29
30 flake8:
31 flake8
32
33 black:
34 black . --exclude "(build/|dist/|\.git/|\.mypy_cache/|\.tox/|\.venv/\.asv/|env|\.eggs)"
35
36 readme:
37 PYTHONPATH=`pwd`:PYTHONPATH ${PYTHON} tools/update_readme.py
38
39 bench:
40 ${PYTHON} -c "import bottleneck; bottleneck.bench()"
41
42 detail:
43 ${PYTHON} -c "import bottleneck; bottleneck.bench_detailed('all')"
44
45 sdist: clean
46 ${PYTHON} setup.py sdist
47 git status
48
49 pypi: clean
50 ${PYTHON} setup.py sdist upload -r pypi
51
52 # doc directory exists so use phony
53 .PHONY: doc
54 doc: clean build
55 rm -rf build/sphinx
56 ${PYTHON} setup.py build_sphinx
57
58 clean:
59 rm -rf build dist Bottleneck.egg-info
60 find . -name \*.pyc -delete
61 rm -f MANIFEST
62 rm -rf ${srcdir}/*.html ${srcdir}/build
63 rm -rf ${srcdir}/*.c
64 rm -rf ${srcdir}/*.so
65 rm -rf ${srcdir}/bn_config.h