#!/usr/bin/make -f

# The tests load the script from bin/, which pybuild does not copy into its
# build directory on its own.
export PYBUILD_BEFORE_TEST=cp -r {dir}/bin {build_dir}/
export PYBUILD_AFTER_TEST=rm -rf {build_dir}/bin {build_dir}/.pytest_cache

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

override_dh_auto_install:
	dh_auto_install --buildsystem=pybuild --destdir=debian/tmp

override_dh_auto_test:
	dh_auto_test --buildsystem=pybuild -- --test-pytest
