#!/usr/bin/make -f

#export DH_VERBOSE=1

%:
	dh $@ --with python2 --buildsystem=python_distutils

override_dh_installchangelogs:
	dh_installchangelogs -i NEWS

override_dh_auto_install:
	dh_auto_install
	# skip a testfile that needs txtorcon which has no python2 package anymore #911271
	find debian/python-foolscap/ -name test_connection.py -delete
	# uses trial instead of setup.py test
	OPENSSL_CONF=$(CURDIR)/debian/openssl.cnf PYTHONPATH=$(CURDIR)/debian/python-foolscap/usr/lib/python2.7/dist-packages/ dh_auto_test --buildsystem=makefile

override_dh_auto_clean:
	# remove pyc's from testsuite
	find . -name "*.pyc" | xargs rm -f
	rm -rf _trial_temp
	rm -rf build
	rm -rf foolscap.egg-info

override_dh_compress:
	dh_compress -X.xhtml
