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
|
#!/usr/bin/make -f
export PYBUILD_NAME=geoalchemy2
%:
dh $@ --buildsystem=pybuild
override_dh_auto_clean:
dh_auto_clean
rm -rf GeoAlchemy2.egg-info .pytest_cache doc/gallery
override_dh_auto_test:
ifeq (,$(filter nocheck,$(DEB_BUILD_OPTIONS)))
$(eval BUILD_DIR=$(shell pybuild --print '{build_dir}'))
cp -r tests $(BUILD_DIR)
python3 $(CURDIR)/debian/tests/setup-db-and-run-tests.py
endif
override_dh_installdocs:
dh_installdocs --doc-main-package=python3-geoalchemy2 -p python-geoalchemy2-doc
dh_installdocs -p python3-geoalchemy2
override_dh_auto_build:
dh_auto_build
ifeq (,$(findstring nodocs, $(DEB_BUILD_OPTIONS)))
cd doc && sphinx-build -bhtml . ../build/html # HTML generator
# avoid lintian duplicate file warning
for thumb in build/html/_images/*_thumb.png; do \
test -f build/html/_images/thumb.png || cp $$thumb build/html/_images/thumb.png; \
ln -sf thumb.png $$thumb; \
done
rm -rf doc/gallery
endif
override_dh_install:
dh_install
rm -rf debian/python3-geoalchemy2/usr/lib/python3/dist-packages/build/tests
|