#!/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 $@ --buildsystem=pybuild

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

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

execute_after_dh_clean:
	rm -rf .hypothesis
