#!/usr/bin/make -f

#export DH_VERBOSE=1
export PYBUILD_NAME=traitlets
export LC_ALL=C.UTF-8

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

ifeq (,$(findstring nodoc, $(DEB_BUILD_OPTIONS)))
execute_after_dh_auto_build:
	PYTHONPATH=$$(pwd) make -C docs html
endif

override_dh_installdocs:
	dh_installdocs -ppython-traitlets-doc --doc-main-package=python3-traitlets
	dh_installdocs --remaining-packages

override_dh_installexamples:
	dh_installexamples -ppython-traitlets-doc --doc-main-package=python3-traitlets
	dh_installexamples --remaining-packages

override_dh_compress:
	dh_compress -ppython-traitlets-doc -X.ttf -X.eot
	dh_compress --remaining-packages

execute_after_dh_auto_clean:
	rm -rf docs/build docs/source/changelog.md
