#!/usr/bin/make -f

export DH_VERBOSE=1

PYVERS=$(shell pyversions -vs)

# do not remove the histogram.c file this code is there
# beacuse git-buildpackage is run without eh patch applyed. It
# will be possible to get rid of this once the patch applyed
# upstream.
override_dh_auto_clean:
	touch src/histogram_omp.c

	dh_auto_clean

override_dh_clean:
	dh_clean

	# remove the cython generated file to force rebuild
	rm -f $(patsubst %.pyx,%.c,$(wildcard src/*.pyx))


override_dh_auto_install:
	dh_auto_install
	dh_numpy

#override_dh_auto_test:
#	dh_auto_test
#ifeq (,$(findstring nocheck,$(DEB_BUILD_OPTIONS)))
#	set -e -x; \
#	for py in $(PYVERS); do \
#		env http_proxy='localhost' python$$py setup.py test;\
#	done
#endif

#skip tests
override_dh_auto_test:

%:
	dh $@ --with python2
