#!/usr/bin/make -f export PYBUILD_NAME=geoalchemy2 %: dh $@ --buildsystem=pybuild execute_after_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}')) for build_dir in $(BUILD_DIR); do cp -r tests $$build_dir; done 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 execute_after_dh_auto_build: ifeq (,$(findstring nodoc, $(DEB_BUILD_OPTIONS))) cd doc && PYTHONPATH=$(CURDIR) 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 execute_after_dh_install: find debian/python3-geoalchemy2/usr/lib -type d \( -name dist-packages -o -name site-packages \) \ -exec rm -rf '{}/build' '{}/tests' \;