#!/usr/bin/make -f

export PYBUILD_NAME = opentracing

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

override_dh_auto_clean:
	dh_auto_clean -O--buildsystem=pybuild

	# Remove pytest leftovers.
	rm -rf .pytest_cache

	# Remove sphinx-generated files.
	rm -rf docs/_build

	# Remove generated coverage files.
	rm -f .coverage coverage.xml

override_dh_auto_build: export http_proxy=127.0.0.1:9
override_dh_auto_build: export https_proxy=127.0.0.1:9
override_dh_auto_build:
	dh_auto_build -O--buildsystem=pybuild

	# Generate the HTML and Info documentation.
	$(MAKE) -C docs html info PYTHONPATH=..

override_dh_installdocs:
	dh_installdocs -O--buildsystem=pybuild --doc-main-package=python3-opentracing --package=python-opentracing-doc
	dh_installdocs -O--buildsystem=pybuild --remaining-packages
