#!/usr/bin/make -f

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

#export PYBUILD_NAME=daphne
export CRYPTOGRAPHY_OPENSSL_NO_LEGACY=1

ifneq ($(PYBUILD_AUTOPKGTEST),1)
# This test only passes when the package is installed.
export PYBUILD_TEST_ARGS := --deselect tests/test_packaging.py::test_fd_endpoint_plugin_installed
endif

%:
	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_clean:
	rm -rf .hypothesis
	dh_clean
