#!/usr/bin/make -f

export PYBUILD_NAME=uncertainties
export DH_VERBOSE=1
export TRAVIS=1 # hack to skip lib2to3.tests.support missing module.

%:
	dh $@ --buildsystem=pybuild

override_dh_clean:
	dh_clean
	rm -rf debian/html

override_dh_auto_build:
	dh_auto_build
ifeq (,$(findstring nodoc, $(DEB_BUILD_OPTIONS)))
	PYTHONPATH=. http_proxy='http://127.0.0.1:9/' sphinx-build -N -E -bhtml doc debian/html
	rm -rf ./build/html/.doctrees
endif

# override_dh_sphinxdoc:
# ifeq (,$(findstring nodoc,$(DEB_BUILD_OPTIONS)))
# 	dh_sphinxdoc -ppython-uncertainties-doc
# endif

override_dh_python3:
	dh_python3
	rm -rfv debian/python3-$(PYBUILD_NAME)/usr/lib/python3.*
