#!/usr/bin/make -f

export PYBUILD_NAME=uncertainties
export DH_VERBOSE=1

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

override_dh_auto_build:
	dh_auto_build
	PYTHONPATH=. http_proxy='http://127.0.0.1:9/' sphinx-build -N -bhtml doc debian/html

override_dh_installchangelogs:
	grep -A 1000 'Version history' PKG-INFO \
	| grep '^        - ' \
	| sed -e 's/^ *//g;s/  */ /g;s/$$/\n/g' \
	| fmt > changelog
	dh_installchangelogs

override_dh_auto_test:
	PYBUILD_SYSTEM=custom \
	PYBUILD_TEST_ARGS="cd uncertainties; nosetests" dh_auto_test
