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

include /usr/share/dpkg/pkg-info.mk

export DEB_VERSION_UPSTREAM  # used by patched docs/conf.py

export PYBUILD_NAME=django-contact-form
# akismet is not yet packaged in Debian.
export PYBUILD_TEST_ARGS := \
    --ds=tests.test_settings \
    --ignore=tests/test_akismet_integration.py

%:
	dh $@ --buildsystem=pybuild

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