#! /usr/bin/make -f

export PYBUILD_NAME=webtest
# disable tests, some dependencies are not packaged, f.e. wsgiproxy
export PYBUILD_DISABLE=test

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

override_dh_auto_install:
	dh_auto_install --buildsystem=pybuild
	mkdir -p docs/_static # Sphinx needs it
	dh_installdirs
	PYTHONPATH=. sphinx-build -N -q -E -b html docs/ debian/python-webtest-doc/usr/share/doc/python-webtest-doc/
	# it's not an extra license file
	echo "python-webtest-doc: extra-license-file usr/share/doc/python-webtest-doc/_sources/license.txt" \
		>> debian/python-webtest-doc/usr/share/lintian/overrides/python-webtest-doc
