| 1 |
clean: |
| 2 |
rm -rf htmlcov python-pycdlib.spec dist MANIFEST .coverage profile build *.lprof .mypy_cache |
| 3 |
find . -iname '*~' -exec rm -f {} \; |
| 4 |
find . -iname '*.pyc' -exec rm -f {} \; |
| 5 |
|
| 6 |
deb: |
| 7 |
debuild -i -uc -us -b |
| 8 |
|
| 9 |
docs: |
| 10 |
groff -mandoc -Thtml man/pycdlib-explorer.1 > docs/pycdlib-explorer.html |
| 11 |
groff -mandoc -Thtml man/pycdlib-extract-files.1 > docs/pycdlib-extract-files.html |
| 12 |
groff -mandoc -Thtml man/pycdlib-genisoimage.1 > docs/pycdlib-genisoimage.html |
| 13 |
./custom-pydoc.py > docs/pycdlib-api.html |
| 14 |
|
| 15 |
flake8: |
| 16 |
-flake8-3 --ignore=E501,E266 --max-complexity 80 pycdlib tools/* |
| 17 |
|
| 18 |
|
| 19 |
|
| 20 |
|
| 21 |
|
| 22 |
|
| 23 |
|
| 24 |
lineprof: |
| 25 |
kernprof-3 -v -l /usr/bin/py.test-3 --verbose tests |
| 26 |
|
| 27 |
mypy: |
| 28 |
mypy --ignore-missing-imports -m pycdlib |
| 29 |
|
| 30 |
profile: |
| 31 |
python3 -m cProfile -o profile /usr/bin/py.test-3 --verbose tests |
| 32 |
python3 -c "import pstats; p=pstats.Stats('profile');p.strip_dirs();p.sort_stats('time').print_stats(30)" |
| 33 |
|
| 34 |
pylint: |
| 35 |
-pylint-3 --rcfile=pylint.conf pycdlib tools/* |
| 36 |
|
| 37 |
rpm: sdist |
| 38 |
rpmbuild -ba python-pycdlib.spec --define "_sourcedir `pwd`/dist" |
| 39 |
|
| 40 |
sdist: |
| 41 |
python3 setup.py sdist |
| 42 |
|
| 43 |
slowtests: |
| 44 |
-PYCDLIB_TRACK_WRITES=1 [ -x /usr/bin/python2 ] && py.test --basetemp=/var/tmp/pycdlib-tests --runslow --verbose tests |
| 45 |
PYCDLIB_TRACK_WRITES=1 py.test-3 --basetemp=/var/tmp/pycdlib-tests --runslow --verbose tests |
| 46 |
|
| 47 |
srpm: sdist |
| 48 |
rpmbuild -bs python-pycdlib.spec --define "_sourcedir `pwd`/dist" |
| 49 |
|
| 50 |
test-coverage: |
| 51 |
PYCDLIB_TRACK_WRITES=1 coverage3 run --source pycdlib /usr/bin/py.test-3 --basetemp=/var/tmp/pycdlib-tests --runslow --verbose tests |
| 52 |
coverage3 html |
| 53 |
xdg-open htmlcov/index.html |
| 54 |
|
| 55 |
tests: |
| 56 |
-[ -x /usr/bin/py.test-2 ] && py.test-2 --verbose tests |
| 57 |
py.test-3 --verbose tests |
| 58 |
|
| 59 |
.PHONY: clean deb docs flake8 lineprof mypy profile pylint rpm sdist slowtests srpm test-coverage tests |