#!/usr/bin/make -f

export STANDARD_MODULES=chunk aifc asynchat imghdr mailcap nntplib pipes smtpd sndhdr sunau uu xdrlib

%:
	dh $@ --buildsystem=pybuild

override_dh_auto_build:
	set -e; for f in $(STANDARD_MODULES); do \
		echo "Building $$f" ; \
		dh_auto_build -- --dir $$f; \
		find $(CURDIR)/.pybuild/ -name '*.whl' -delete;\
	done

execute_after_dh_auto_clean:
	find $(CURDIR) -type d -name 'build' -exec rm -R {} + ;