-
Notifications
You must be signed in to change notification settings - Fork 39
/
Copy pathMakefile
57 lines (43 loc) · 1.92 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
clean:
rm -rf htmlcov python-pycdlib.spec dist MANIFEST .coverage profile build *.lprof .mypy_cache
find . -iname '*~' -exec rm -f {} \;
find . -iname '*.pyc' -exec rm -f {} \;
deb:
debuild -i -uc -us -b
docs:
groff -mandoc -Thtml man/pycdlib-explorer.1 > docs/pycdlib-explorer.html
groff -mandoc -Thtml man/pycdlib-extract-files.1 > docs/pycdlib-extract-files.html
groff -mandoc -Thtml man/pycdlib-genisoimage.1 > docs/pycdlib-genisoimage.html
./custom-pydoc.py > docs/pycdlib-api.html
flake8:
-flake8-3 --ignore=E501,E266 --max-complexity 80 pycdlib tools/*
# kernprof-3 comes from the "line_profiler" package. It allows performance
# profiling on a line-by-line basis, but needs to be told which functions to
# profile by using an "@profile" decorator on particular functions. The easiest
# way to use this is to profile using the built-in cProfile module (like the
# "profile" target), then mark the hotspots with "@profile", and then run
# the "lineprof" target.
lineprof:
kernprof-3 -v -l /usr/bin/py.test-3 --verbose tests
mypy:
mypy --ignore-missing-imports -m pycdlib
profile:
python3 -m cProfile -o profile /usr/bin/py.test-3 --verbose tests
python3 -c "import pstats; p=pstats.Stats('profile');p.strip_dirs();p.sort_stats('time').print_stats(30)"
pylint:
-pylint-3 --rcfile=pylint.conf pycdlib tools/*
rpm: sdist
rpmbuild -ba python-pycdlib.spec --define "_sourcedir `pwd`/dist"
sdist:
python3 setup.py sdist
slowtests:
PYCDLIB_TRACK_WRITES=1 py.test-3 --basetemp=/var/tmp/pycdlib-tests --runslow --verbose tests
srpm: sdist
rpmbuild -bs python-pycdlib.spec --define "_sourcedir `pwd`/dist"
test-coverage:
PYCDLIB_TRACK_WRITES=1 coverage3 run --source pycdlib /usr/bin/py.test-3 --basetemp=/var/tmp/pycdlib-tests --runslow --verbose tests
coverage3 html
xdg-open htmlcov/index.html
tests:
py.test-3 --verbose tests
.PHONY: clean deb docs flake8 lineprof mypy profile pylint rpm sdist slowtests srpm test-coverage tests