#!/usr/bin/make -f

# Uncomment this to turn on verbose mode.
#export DH_VERBOSE=1

#export PYBUILD_NAME=daphne

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

override_dh_auto_install:
	dh_auto_install
	rm -rf debian/tmp/usr/lib/python3*/dist-packages/.hypothesis

override_dh_installman:
	docbook-to-man debian/manpage.daphne.sgml > daphne.1
	dh_installman

override_dh_auto_test:
ifeq (,$(filter nocheck,$(DEB_BUILD_OPTIONS)))
	dh_auto_test -- --system=custom --test-args="PYTHONPATH=. {interpreter} -m pytest"
endif

override_dh_clean:
	rm -rf .hypothesis
	dh_clean
