#!/usr/bin/make -f

PYTHONS:=$(shell pyversions -vr)
PYTHON3S:=$(shell py3versions -vr)

export PYBUILD_NAME=nose-exclude

UPSTREAM_GIT = git://github.com/kgrandis/nose-exclude
-include /usr/share/openstack-pkg-tools/pkgos.make

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

ifeq (,$(findstring nocheck, $(DEB_BUILD_OPTIONS)))
override_dh_auto_test:
	set -e ; set -x ; for i in $(PYTHONS) $(PYTHON3S) ; do \
		PYMAJOR=`echo $$i | cut -d'.' -f1` ; \
		echo "===> Testing with python$$i (python$$PYMAJOR)" ; \
		python$$i setup.py test ; \
	done
endif
