Comment 3 for bug 709247

Revision history for this message
Colin Watson (cjwatson) wrote :

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.