#!/usr/bin/make -f

export PYBUILD_NAME := pydoctor
export PYBUILD_AFTER_INSTALL=rm -rf {destdir}/usr/lib/python*/dist-packages/.coverage

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

override_dh_auto_test:
	# Run tests specified in upstream tox.ini
	dh_auto_test -- --system=custom \
		--test-args='find docs/ -name \*.py ! -path '*demo/*' | xargs pyflakes3 && \
		cd {build_dir} && \
		python3 --version && \
		trial3 --version && \
		find pydoctor/ -name \*.py ! -path '*/testpackages/*' ! -path '*/sre_parse36.py' | xargs pyflakes3'
