#!/usr/bin/make -f
%:
	dh $@ --with python3 --buildsystem=pybuild

override_dh_auto_test:
	PYBUILD_SYSTEM=custom \
	PYBUILD_BEFORE_TEST='cp -r src/plaster_pastedeploy.egg-info {build_dir}' \
	PYBUILD_AFTER_TEST='rm -r {build_dir}/plaster_pastedeploy.egg-info' \
	PYBUILD_TEST_ARGS='env PYTHONPATH={build_dir} {interpreter} -m pytest' \
	dh_auto_test

override_dh_auto_clean:
	rm -rf *.egg-info .pytest_cache
	find . -iname '*.pyc' -delete
	for i in $$(find . -type d -iname __pycache__) ; do rm -rf $$i ; done
