#!/usr/bin/make -f

export PYBUILD_NAME=itsdangerous
export DEB_BUILD_MAINT_OPTIONS=hardening=+all
export PYDEFAULT=`py3versions -d -v`

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

override_dh_sphinxdoc:
ifeq (,$(findstring nodocs, $(DEB_BUILD_OPTIONS)))
	PYTHONPATH=.pybuild/cpython3_$(PYDEFAULT)_itsdangerous/build/ python3 -m sphinx -b html docs $(CURDIR)/debian/python-itsdangerous-doc/usr/share/doc/python-itsdangerous-doc/html
	dh_sphinxdoc -O--buildsystem=pybuild
endif

override_dh_installchangelogs:
	dh_installchangelogs CHANGES.rst
