On Thu, Jun 01, 2017 at 11:26:55AM -0700, Toshio Kuratomi wrote:
> I think it is better if the build system sets LANG=C.UTF-8, not the
> python specific macros.

Yeah, setting it through python macros would mean that e.g. any
python program invoked during the build would see the obsolete non-utf8
encoding. Seems better to just set LANG=C.UTF-8 globally.

Zbyszek

> 
> On Thu, Jun 1, 2017 at 8:56 AM, Miro Hrončok <mhron...@redhat.com> wrote:
> > Hi Pythonistas.
> >
> > Regarding our Python 3 C.UTF-8 locale coercing [1], aka PEP 538 [2].
> >
> > As you probably know, we build RPM packages with the C locale. So everytime
> > we use python3 in the spec file, the coercing message is shown. This can be
> > more problematic than just spamming the build logs, see for example the
> > related rpmlint bug [3][4].
> >
> > Our macros, such as %{python3_sitelib}, %{python3_version} etc. all call
> > python3 and generate the warning. Should we "fix" our macros to set the LANG
> > to C.UTF-8?
> >
> > If we change the %{__python3} macro entirely, we might get rid of all of
> > those warnings and we will workaround the fact that we build RPM packages
> > with the C locale. On the other hand the packager would not be able to set a
> > desired locale because it will always be overwritten:
> >
> >     # The crazy test suite needs Czech locale
> >     LANG=cs_CZ.utf8 %{__python3} -m pytest
> >
> > Will become:
> >
> >     LANG=cs_CZ.utf8 LANG=C.utf8 /usr/bin/python3 -m pytest
> >
> > So I would not do that.
> >
> > But we can change all other macros in /usr/lib/rpm/macros.d/macros.python3
> > to set the UTF-8 locale. Would that be wise? Desired?
> >
> > Any thoughts?
> >
> >
> > [1] https://fedoraproject.org/wiki/Changes/python3_c.utf-8_locale
> > [2] https://www.python.org/dev/peps/pep-0538/
> > [3] https://bugzilla.redhat.com/show_bug.cgi?id=1457786
> > [4] https://bugzilla.redhat.com/show_bug.cgi?id=1436345
> >
> > --
> > Miro Hrončok
> > --
> > Phone: +420777974800
> > IRC: mhroncok
> > _______________________________________________
> > python-devel mailing list -- python-devel@lists.fedoraproject.org
> > To unsubscribe send an email to python-devel-le...@lists.fedoraproject.org
> _______________________________________________
> python-devel mailing list -- python-devel@lists.fedoraproject.org
> To unsubscribe send an email to python-devel-le...@lists.fedoraproject.org
_______________________________________________
python-devel mailing list -- python-devel@lists.fedoraproject.org
To unsubscribe send an email to python-devel-le...@lists.fedoraproject.org

Reply via email to