#!/usr/bin/make -f

export PYBUILD_NAME = aiohttp
# enable pytest also here to make backports easier
export PYBUILD_TEST_PYTEST=1
export PYBUILD_TEST_ARGS={dir}/tests
export DEB_BUILD_MAINT_OPTIONS = hardening=+all

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

override_dh_auto_build:
	sed -i -e '/sphinxcontrib.asyncio/d' -e '/aiohttp_theme/d' docs/conf.py
	${MAKE} -C docs html || true
	dh_auto_build

override_dh_auto_clean:
	rm -rf .cache
	dh_auto_clean

override_dh_strip:
	dh_strip --dbgsym-migration='python3-aiohttp-dbg (<< 3.7.4-2~)'

override_dh_auto_test:
	# disable tests for now:
	# https://bugs.python.org/issue28634 needs to be fixed in Debian
	# and tests patched to not access internet during build (see https://bugs.debian.org/830567)
