#!/usr/bin/make -f

export DH_ALWAYS_EXCLUDE=tests:dbs_data.tmp:versioning/test
export PYBUILD_TEST_PYTEST=1
export PYBUILD_TEST_ARGS="{dir}"

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

override_dh_clean:
	# Forcibly remove all traces of the upstream module docs build, since
	# we rebuild what we can, and the rest relies on pudge, which
	# is an obselete, abandoned project.
	# SQLObject upstream is switching to sphinx, so revisit this once
	# that's happened.
	rm -rf docs/html/
	dh_clean

override_dh_installdocs:
	docs/rebuild
	dh_installdocs

override_dh_installchangelogs:
	dh_installchangelogs -k docs/News.txt

override_dh_python2:
	dh_python2 --shebang=/usr/bin/python
