Re: Python package documentation with Sphinx: encoding related build failure
* Barry Warsaw <barry@python.org> [140724 17:41]:
> I don't remember the details, but I think there are some build
> environments where the locale is not set correct (or not set?),
> which can cause Python's default encodings to kick in and make
> incorrect assumptions (albeit based on limited available
> information). I think I've seen this with sbuilds occasionally.
> The fix is usually to be explicit about the encoding or make sure
> the locale is set to UTF-8. It'll also work differently depending
> on whether you're using Python 2 or 3.
>
> Sorry I'm a little fuzzy on the details - it's been a while.
> Hopefully that gives enough of a clue to keep digging in the right
> place.
I had the problem with a build environment which resets LC_ALL to C or
unsets it (can't remember if it's at the pbuilder or pybuild level).
To print a (unicode) string, python3 needs to know how to encode the
string and uses locale for that. In my case the following worked:
override_dh_auto_test:
LC_ALL=C.UTF-8 dh_auto_test
--
Etienne Millon
Reply to: