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

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

PY2VERS = $(shell pyversions -r -v)


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


override_dh_auto_build:
	dh_auto_build --buildsystem=python_distutils
	$(MAKE) -C doc html


override_dh_auto_test:
ifeq (,$(findstring nocheck,$(DEB_BUILD_OPTIONS)))
	set -e -x; \
	for py in $(PY2VERS); do \
		env PYTHONPATH=. python$$py -m unittest discover -v tests; \
	done
endif


override_dh_auto_clean:
	dh_auto_clean --buildsystem=python_distutils
	$(RM) -r mipp.egg-info
	$(MAKE) -C doc clean


.PHONY: override_dh_auto_build, override_dh_autoclean, override_dh_auto_test
