#!/usr/bin/make -f
# -*- mode: makefile; coding: utf-8 -*-

export PYBUILD_NAME = binaryornot

%:
	dh $@ --buildsystem=pybuild

override_dh_auto_clean:
	rm -rf .hypothesis tests/files/troublesome.pyc
	tar caf keep_pyc_files.tar.gz tests/files/*.pyc
	dh_auto_clean
	tar xaf keep_pyc_files.tar.gz
	rm keep_pyc_files.tar.gz

override_dh_auto_test:
	cp `ls /usr/lib/python*/__pycache__/*.pyc | head -n1` tests/files/troublesome.pyc
	dh_auto_test
