#!/usr/bin/make -f

export PYBUILD_NAME=pyphen
build3vers := $(shell py3versions -sv)

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

override_dh_auto_clean:
	dh_auto_clean
	rm -rf $(CURDIR)/.pytest

override_dh_auto_test:
ifeq (,$(filter nocheck,$(DEB_BUILD_OPTIONS)))
	set -e && for i in $(build3vers); do \
	  echo "-- running tests for python"$$i" --" ; \
	  python$$i /usr/bin/py.test-3 test.py;\
	done
endif
