#!/usr/bin/make -f

export PYBUILD_NAME=aionotify

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

override_dh_auto_clean:
	dh_auto_clean
	rm -rf .eggs

override_dh_auto_test:
ifeq ($(filter nocheck,$(DEB_BUILD_PROFILES)),)
	# TODO requires missing python3-asynctest package
	#dh_auto_test
endif

override_dh_installexamples:
	dh_installexamples
	find debian/python3-aionotify/usr/share/doc/python3-aionotify/examples/ \
	  -name '*.py' \
	  -exec sed -i 's|#!/usr/bin/env python|#!/usr/bin/python3|' {} \;
