#! /usr/bin/make -f
export PYBUILD_NAME=formencode
export PYBUILD_TEST_NOSE=1

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

override_dh_auto_install:
	dh_auto_install --buildsystem=pybuild
	find debian/python-formencode/ -type d -name i18n -print0 | xargs --null --no-run-if-empty rm -rf
	find debian/python3-formencode/ -type d -name i18n -print0 | xargs --null --no-run-if-empty rm -rf
	find debian/python*formencode -type d -name docs -print0 | xargs --null --no-run-if-empty rm -rf
	dh_install -X.po -X.py --sourcedir=formencode/i18n . usr/share/locale/ -pformencode-i18n
