#!/usr/bin/make -f

export PYBUILD_NAME=pydispatch

%:
	dh $@ --with python3 --buildsystem=pybuild

override_dh_installdocs:
	cd docs/pydoc && PYTHONDONTWRITEBYTECODE=1 PYTHONPATH=../.. ./builddocs.py
	find docs/pydoc -type f -name '*.html' -print0 | xargs -0r sed -i -e 's@<br><a href="file:.*</a>@@g'
	dh_installdocs

override_dh_installexamples:
	chmod 0644 examples/*py
	dh_installexamples
