#!/usr/bin/make -f
# -*- makefile -*-

#export DH_VERBOSE=1
export PYBUILD_NAME=pymodbus
export http_proxy = http://127.0.0.1:9
export https_proxy = https://127.0.0.1:9

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

execute_after_dh_auto_build:
	( cd doc; \
	  PYTHONPATH=.. http_proxy='127.0.0.1:9' python3 -m sphinx -M html . _build )

override_dh_auto_test:
	PYTHONPATH=$(CURDIR) dh_auto_test

override_dh_installdocs:
	dh_installdocs -ppython-pymodbus-doc --doc-main-package=python-pymodbus-doc
	dh_installdocs --remaining-packages

override_dh_installexamples:
	dh_installexamples -ppython-pymodbus-doc --doc-main-package=python-pymodbus-doc
	dh_installexamples --remaining-packages
