#!/usr/bin/make -f

export PYBUILD_NAME=mt-940
export PYBUILD_TEST_ARGS={dir}/mt940_tests/

# try to prevent unsanctioned downloads
export  http_proxy=http://127.0.0.1:9/
export  https_proxy=http://127.0.0.1:9/


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

override_dh_sphinxdoc:
	python3 -m sphinx -b html docs $(CURDIR)/debian/python-mt-940-doc/usr/share/doc/python-mt-940-doc/html
	dh_sphinxdoc

# remove unnecessary files after install
execute_after_dh_auto_install:
	rm -rf $(CURDIR)/debian/python3-mt-940/usr/lib/python3.11/dist-packages/mt940_tests/*
	rm -f $(CURDIR)/debian/python3-mt-940/usr/lib/python3.11/dist-packages/.coverage
	rm -rf $(CURDIR)/debian/python3-mt-940/usr/lib/python3.11/dist-packages/htmlcov/*
	rm -f $(CURDIR)/debian/python3-mt-940/usr/lib/python3.11/dist-packages/htmlcov/.gitignore
