#! /usr/bin/make -f

export PYBUILD_AFTER_TEST=$(RM) -r {build_dir}/.pytest_cache/

%:
	dh $@ --buildsystem=pybuild

execute_after_dh_auto_build-indep:
ifeq (,$(filter nodoc,$(DEB_BUILD_OPTIONS)))
	PYTHONPATH=$(CURDIR) http_proxy='http://127.0.0.1:9/' https_proxy='https://127.0.0.1:9/' \
	sphinx-build -N -E -T -b html docs .pybuild/docs/html/
	$(RM) -r .pybuild/docs/html/.doctrees
	$(RM) -r .pybuild/docs/html/_static/vendor
endif
