#!/usr/bin/make -f

#export DH_VERBOSE=1
export PYBUILD_NAME=pydl
export PYBUILD_BEFORE_TEST=cp conftest.py {build_dir}
export PYBUILD_AFTER_TEST=rm {build_dir}/conftest.py
export PYBUILD_TEST_ARGS=--confcutdir=.

BUILD_DATE  = $(shell LC_ALL=C date -u "+%B %d, %Y" -d "@$(SOURCE_DATE_EPOCH)")
SPHINXOPTS := -D html_last_updated_fmt="$(BUILD_DATE)" -D html_show_copyright=0

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

override_dh_auto_build:
	dh_auto_build
	PYTHONPATH=. sphinx-build $(SPHINXOPTS) -N -bhtml docs/ build/html
