#!/usr/bin/make -f

export PYDEB_SUGGESTS_EXTRAS=test extra zope34 docs
export PYDEB_RECOMMENDS_EXTRAS=latest adding

include /usr/share/python/python.mk

%:
	dh $@ --with pydeb --with python2

override_dh_auto_build:
	rm -f src/z3c/form/locales/z3c.form.pot
	for po in src/z3c/form/locales/*/LC_MESSAGES/*.po ; do \
	    msgfmt $$po -o $${po%.po}.mo; \
	    rm $$po; \
	done
	dh_auto_build

override_dh_install:
	dh_install
	for py in $(shell pyversions -vr debian/control); do \
	    install -D -m 644 src/z3c/__init__.py \
	        debian/python-z3c$(call py_libdir_sh, $$py)/z3c/__init__.py; \
	done
