| 1 |
#!/usr/bin/make -f |
| 2 |
#export DH_VERBOSE = 1 |
| 3 |
export HOME = $(shell pwd) |
| 4 |
export PYBUILD_NAME=libpysal |
| 5 |
export PYBUILD_TEST_CUSTOM=1 |
| 6 |
|
| 7 |
SRC_DIR="usr/lib/python3/dist-packages/libpysal/examples/" |
| 8 |
DEST_DIR="usr/share/doc/python3-libpysal/examples" |
| 9 |
|
| 10 |
|
| 11 |
%: |
| 12 |
dh $@ --sphinxdoc --buildsystem=pybuild |
| 13 |
|
| 14 |
override_dh_auto_test: |
| 15 |
ifeq (,$(filter nocheck,$(DEB_BUILD_OPTIONS))) |
| 16 |
pytest-3 -v --ignore=libpysal/graph/tests/ \ |
| 17 |
--ignore=libpysal/weights/tests/test_contiguity.py \ |
| 18 |
--ignore=libpysal/cg/tests/test_geoJSON.py \ |
| 19 |
--ignore=libpysal/weights/tests/test_util.py \ |
| 20 |
--ignore=libpysal/examples/tests/test_available.py \ |
| 21 |
--ignore=libpysal/io/iohandlers/tests/test_db.py |
| 22 |
dh_auto_test |
| 23 |
endif |
| 24 |
|
| 25 |
# Build sphinx HTML documentation |
| 26 |
override_dh_auto_build: |
| 27 |
dh_auto_build |
| 28 |
PYTHONPATH=. https_proxy='https://127.0.0.1:9/' no_proxy=localhost python3 -m sphinx -N -d debian/doctrees -bhtml docs/ debian/html |
| 29 |
|
| 30 |
|
| 31 |
override_dh_link: |
| 32 |
dh_link |
| 33 |
# Fixe privacy-breach-generic |
| 34 |
find debian/python-libpysal-doc/ -name '*.html' -exec sed -i 's/.*https:.*//g' {} \; |
| 35 |
|
| 36 |
#fixe package-contains-documentation-outside-usr-share-doc |
| 37 |
rm -rf debian/python3-libpysal/usr/lib/python3/dist-packages/lattice.dbf |
| 38 |
rm -rf debian/python3-libpysal/usr/lib/python3/dist-packages/libpysal/.gitignore |
| 39 |
rm -rf debian/python3-libpysal/usr/share/doc/python3-libpysal/examples/__pycache__ |
| 40 |
rm -rf debian/python3-libpysal/usr/lib/python3/dist-packages/core |
| 41 |
rm -rf debian/python-libpysal-doc/usr/share/doc/python-libpysal-doc/html/_static/bootstrap-3.4.1/fonts/ |
| 42 |
rm -rf debian/python-libpysal-doc/usr/share/doc/python-libpysal-doc/html/_static/bootswatch-3.4.1/fonts/ |
| 43 |
find debian/python-libpysal-doc/usr/share/doc -name '*.js' -delete |
| 44 |
find debian/python-libpysal-doc/usr/share/doc -type d -empty -delete |
| 45 |
#Fixe duplicate-files |
| 46 |
jdupes -rl debian/python-libpysal-doc/usr |
| 47 |
jdupes -rl debian/python3-libpysal/usr |
| 48 |
|
| 49 |
override_dh_installexamples: |
| 50 |
dh_installexamples libpysal/examples/* |