#!/usr/bin/make -f
#export DH_VERBOSE=1
#export DEB_BUILD_OPTIONS=nocheck
export PYBUILD_NAME=pytest-tornado

# block the net precautionary
export http_proxy=http://127.0.0.1:9/
export https_proxy=http://127.0.0.1:9/

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

override_dh_auto_test:

override_dh_auto_install:
	dh_auto_install
	PYBUILD_SYSTEM=custom PYBUILD_TEST_ARGS="{interpreter} -m pytest -v -x" dh_auto_test
	# run tests after install bcs the plugin needs to get registered by setup.py/entry_points

override_dh_installdocs:
	pandoc -f rst -t plain -o .pybuild/README README.rst
	dh_installdocs -A .pybuild/README
