#!/usr/bin/make -f

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

PYTHON2=$(shell pyversions -vr)

%:
	dh $@ --with python2,sphinxdoc

ifeq (,$(filter nocheck,$(DEB_BUILD_OPTIONS)))
test-python%:
	python$* runtests.py

override_dh_auto_test: $(PYTHON2:%=test-python%)
endif

override_dh_installdocs:
	cd docs && $(MAKE) html
	dh_installdocs docs/_build/html

override_dh_auto_clean:
	dh_auto_clean
	rm -rf build
	rm -rf docs/_build
	rm -rf *.egg-info
