#!/usr/bin/make -f

export PYBUILD_NAME = tenacity
export PYBUILD_BEFORE_TEST = cp -r tests '{build_dir}/tenacity'
export PYBUILD_AFTER_TEST = rm -r '{build_dir}/tenacity/tests'

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

override_dh_installchangelogs:
	dh_installchangelogs $(CURDIR)/debian/CHANGELOG

execute_before_dh_sphinxdoc:
ifeq (,$(findstring nodocs, $(DEB_BUILD_OPTIONS)))
	PYTHON=python3 python3 -m sphinx -b html doc/source debian/python-tenacity-doc/usr/share/doc/python-tenacity-doc/html
endif
