#!/usr/bin/make -f

export PYBUILD_NAME=dnachisel
export PYBUILD_DESTDIR=debian/tmp
export PYBUILD_TEST_PYTEST=1
export PYBUILD_TEST_ARGS=-c {dir}/debian/tests/pytest.ini tests
export MPLBACKEND=Agg

%:
	dh $@ --buildsystem=pybuild


ifeq (,$(filter nodoc,$(DEB_BUILD_PROFILES)))
execute_after_dh_auto_build:
	http_proxy=http://127.0.0.1:9 https_proxy=http://127.0.0.1:9 \
	PYTHONPATH=.:$(PYTHONPATH) python3 -m sphinx -N -b html -c debian/sphinx docs debian/html
endif

override_dh_auto_clean:
	dh_auto_clean
	rm -rf debian/html debian/tests/.pytest_cache

override_dh_installexamples:
	dh_installexamples -X.gitignore
