#!/usr/bin/make -f

# DH_VERBOSE := 1

export PYBUILD_NAME=pyosmium

%:
	dh $@ \
	    --buildsystem pybuild \
	    --with python2,python3 \
	    --parallel

override_dh_clean:
	dh_clean
	
	$(RM) -r doc/_build

override_dh_auto_build-indep:
	dh_auto_build --indep

	(cd doc && make html)

override_dh_auto_test:
	PYBUILD_SYSTEM=custom \
	PYBUILD_TEST_ARGS="cd test && {interpreter} run_tests.py" dh_auto_test

override_dh_install:
	dh_install

	# Remove embedded jquery.js in favor of libjs-jquery
	$(RM) debian/*/usr/share/doc/*/html/_static/jquery.js

	# Remove embedded underscore.js in favor of libjs-underscore
	$(RM) debian/*/usr/share/doc/*/html/_static/underscore.js

