#!/usr/bin/make -f
export PYBUILD_TEST_ARGS=tests/unit

%:
	dh $@ --buildsystem=pybuild

override_dh_auto_build:
	dh_auto_build $@ --buildsystem=pybuild
	cd docs; PYTHONPATH=$(CURDIR) DEB_VERSION_UPSTREAM=$(DEB_VERSION_UPSTREAM) LC_ALL=C.UTF-8 LANGUAGE=C.UTF-8 sphinx-build -bhtml -d _build/doctrees source _build/html

execute_after_dh_installexamples:
	sed -i '1s,^#!/usr/bin/env python$$,#!/usr/bin/python3,' \
		debian/*/usr/share/doc/*/examples/*/*.py
