If you need a UTF-8 locale in a build context, you need to generate it dynamically, as you cannot assume that it is already available. Something like this:
debian/tmp-locale:
mkdir -p $@
if ! localedef -i en_US -c -f UTF-8 -A /usr/share/locale/locale.alias --quiet $@/en_US.UTF-8; then \
rm -rf $@; \ exit 1; \
fi
Then make your other targets depend on debian/tmp-locale, run setup.py with LOCPATH=$(CURDIR)/debian/tmp-locale, and rm -rf debian/tmp-locale in an override_dh_clean target.
If you need a UTF-8 locale in a build context, you need to generate it dynamically, as you cannot assume that it is already available. Something like this:
debian/tmp-locale: locale/ locale. alias --quiet $@/en_US.UTF-8; then \
exit 1; \
mkdir -p $@
if ! localedef -i en_US -c -f UTF-8 -A /usr/share/
rm -rf $@; \
fi
Then make your other targets depend on debian/tmp-locale, run setup.py with LOCPATH= $(CURDIR) /debian/ tmp-locale, and rm -rf debian/tmp-locale in an override_dh_clean target.