#!/usr/bin/make -f
#export DH_VERBOSE=1

export PYBUILD_NAME=django-contact-form
export PYBUILD_SYSTEM=distutils

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

override_dh_auto_build: export http_proxy=127.0.0.1:9
override_dh_auto_build: export https_proxy=127.0.0.1:9

override_dh_sphinxdoc:
ifeq (,$(findstring nodoc, $(DEB_BUILD_OPTIONS)))
	PYTHONPATH=. python3 -m sphinx -b html -N docs $(CURDIR)/debian/python-django-contact-form-doc/usr/share/doc/python-django-contact-form-doc/html
	dh_sphinxdoc
endif

executer_after_dh_auto_clean:
	rm -rf build/ django_contact_form.egg-info/

override_dh_auto_test:
	PYBUILD_SYSTEM=custom \
	PYTHONPATH=src PYBUILD_TEST_ARGS="{interpreter} ./runtests.py" \
		dh_auto_test
