#!/usr/bin/make -f export PYBUILD_NAME=pkginfo # Work around https://bugs.debian.org/1051837 egg_info := \ tests/unit/dodgy/namespaced.dodgy-0.1.egg-info \ tests/unit/funny/funny.egg-info \ tests/unit/manky/namespaced.manky-0.1.egg-info define save-egg-info = for x in $(egg_info); do \ if [ ! -d "$$x.safe" ]; then cp -a "$$x" "$$x.safe"; fi; \ done endef define restore-egg-info = for x in $(egg_info); do \ if [ -d "$$x.safe" ]; then rm -rf "$$x"; cp -a "$$x.safe" "$$x"; fi; \ done endef %: dh $@ --with sphinxdoc --buildsystem=pybuild override_dh_auto_build: $(save-egg-info) dh_auto_build --buildsystem=pybuild LC_ALL=C PYTHONPATH=src http_proxy='http://127.0.0.1:9/' sphinx-build -N -bhtml docs build/sphinx/html override_dh_auto_clean: $(save-egg-info) dh_auto_clean $(restore-egg-info)