#! /usr/bin/make -f export PYBUILD_NAME=formencode export DH_ALWAYS_EXCLUDE=tests # We need to have extra data files and the i18n files in place # for the tests, but pybuild.testfiles doesn't preserve the directory # structure we need - https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=947800 # So we kludge around it here define PYBUILD_BEFORE_TEST cp {dir}/formencode/tests/non_empty.txt {build_dir}/formencode/tests/ cp -r {dir}/formencode/tests/htmlfill_data {build_dir}/formencode/tests/ cp -r {dir}/formencode/i18n {build_dir}/formencode/ endef export PYBUILD_BEFORE_TEST %: dh $@ --with python3 --buildsystem=pybuild override_dh_auto_install: dh_auto_install --buildsystem=pybuild dh_install -X.po -X.py -ppython3-formencode formencode/i18n/* /usr/share/locale/ find debian/python3-formencode/ -type d \( -name i18n -or -name docs \) -print0 | xargs --null --no-run-if-empty rm -rf override_dh_auto_test: # network is required for the http://this.domain.does.not.exist.example.org/test.html test LC_ALL=C.UTF-8 LANGUAGE=C.UTF-8 http_proxy='' dh_auto_test --buildsystem=pybuild -- --test-pytest