#!/usr/bin/make -f

export PYBUILD_NAME = aio-pika

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

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

override_dh_auto_test:
	# don't run the tests, module aiomisc is required and it's not on Debian.

execute_after_dh_auto_build:
	# Insert $DEB_VERSION_UPSTREAM into Sphinx configuration, to mitigate "No package metadata was found" error during build.
	sed -i "s/^__version__.*/__version__ = '$(DEB_VERSION_UPSTREAM)'/" docs/source/conf.py
	PYTHONPATH=. http_proxy='127.0.0.1:9' python3 -m sphinx -N -bhtml docs/source build/html # HTML generator
