#!/usr/bin/make -f

export DH_VERBOSE=1

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

# 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 -- -s custom --test-args="env PYTHONPATH={build_dir} {interpreter} test/test_all.py"
