#!/usr/bin/make -f

export PYBUILD_NAME=klepto

export PYBUILD_TEST_CUSTOM=1
export PYBUILD_TEST_ARGS={interpreter} -m klepto.tests

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

ifeq (,$(findstring nodoc,$(DEB_BUILD_OPTIONS)))
execute_after_dh_auto_build:
	PYTHONPATH=$(CURDIR) $(MAKE) -C docs SPHINXBUILD=sphinx-build html

execute_after_dh_auto_clean:
	$(MAKE) -C docs SPHINXBUILD=sphinx-build clean

override_dh_installdocs:
	dh_installdocs -ppython-klepto-doc --doc-main-package=python3-klepto
	dh_installdocs --remaining-packages
	mv debian/python-klepto-doc/usr/share/doc/python3-klepto/build debian/python-klepto-doc/usr/share/doc/python3-klepto/html
endif
