#!/usr/bin/make -f
export DEB_BUILD_MAINT_OPTIONS = hardening=+all
export PYBUILD_NAME = pycosat
export PYBUILD_DISABLE_python2 = 1

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

override_dh_auto_test:
ifeq (,$(filter nocheck,$(DEB_BUILD_OPTIONS)))
	cd $(shell pybuild --print build_dir --interpreter python3) && python3 test_pycosat.py
endif

override_dh_install:
	dh_install
	find debian -name "test_*.py" -delete