#!/usr/bin/make -f

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

override_dh_auto_test:
ifeq (,$(findstring nocheck,$(DEB_BUILD_OPTIONS)))
	set -e; \
	for ver in $(shell pyversions -vr); do \
		python$$ver tests/run_tests.py; \
	done
endif

override_dh_clean:
	rm -fR docs/build
	dh_clean

build: build-indep
build-indep: docs/build/html

docs/build/html:
	cd docs && $(MAKE) html
