#!/usr/bin/make -f
# -*- makefile -*-

# Uncomment this to turn on verbose mode.
#export DH_VERBOSE=1

PY2VERS = $(shell pyversions -r -v)


%:
	dh $@ --with python2 --buildsystem=python_distutils


override_dh_auto_test:
ifeq (,$(findstring nocheck,$(DEB_BUILD_OPTIONS)))
	set -e -x; \
	for py in $(PY2VERS); do \
		cd $(CURDIR)/build/lib.*-$$py; \
		env PYTHONPATH=. python$$py /usr/bin/nosetests -v pykdtree.test_tree; \
	done
endif


.PHONY: override_dh_auto_test
