#!/usr/bin/make -f

DH_VERBOSE := 1
export PYBUILD_NAME=xopen

PYTHON2 := $(shell pyversions -r)
PYTHON3 := $(shell py3versions -r)

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

override_dh_auto_test:
ifeq ($(filter nocheck,$(DEB_BUILD_OPTIONS)),)
	for py in $(PYTHON2) ; do\
	    $$py setup.py nosetests -v ; \
	done
	for py in $(PYTHON3) ; do\
	    $$py setup.py nosetests -v ; \
	done
endif
