I'm looking at getting the %check of the pysvn package working.

What I'm seeing is the tests fail because of an issue with python3.9 and 
locales.

The test code uses locale.getdefaultlocale() to find out what can be set and 
uses locale.setlocale() to init the locale.

After mock fails to run the %check I do this to investigate:

$ mock -r fedora-33-x86_64 --shell --no-clean
...
<mock-chroot> sh-5.0# locale
LANG=C.UTF-8
LC_CTYPE="C.UTF-8"
LC_NUMERIC="C.UTF-8"
LC_TIME="C.UTF-8"
LC_COLLATE="C.UTF-8"
LC_MONETARY="C.UTF-8"
LC_MESSAGES="C.UTF-8"
LC_PAPER="C.UTF-8"
LC_NAME="C.UTF-8"
LC_ADDRESS="C.UTF-8"
LC_TELEPHONE="C.UTF-8"
LC_MEASUREMENT="C.UTF-8"
LC_IDENTIFICATION="C.UTF-8"
LC_ALL=
<mock-chroot> sh-5.0# python3.9
Python 3.9.0 (default, Oct  6 2020, 00:00:00) 
[GCC 10.2.1 20200826 (Red Hat 10.2.1-3)] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> import locale
>>> locale.getdefaultlocale()
('en_US', 'UTF-8')
>>> locale.setlocale(locale.LC_ALL, 'en_US.UTF-8')
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "/usr/lib64/python3.9/locale.py", line 610, in setlocale
    return _setlocale(category, locale)
locale.Error: unsupported locale setting
>>> locale.setlocale(locale.LC_ALL, 'C.UTF-8')
'C.UTF-8'
>>> 
<mock-chroot> sh-5.0# 

I see this from the f33 command line:

$ LC_ALL=C.UTF-8 python3.9 -c 'import locale;print(locale.getdefaultlocale())'
('en_US', 'UTF-8')
$ LC_ALL=de_DE.UTF-8 python3.9 -c 'import 
locale;print(locale.getdefaultlocale())'
('de_DE', 'UTF-8')
$ LC_ALL=en_GB.UTF-8 python3.9 -c 'import 
locale;print(locale.getdefaultlocale())'
('en_GB', 'UTF-8')

Not sure what is wrong here.

python does not report C.UTF-8 as the default.
mock does not have en_US.UTF-8 setup.

Is my way forward to add en_US.UTF-8 locale?
What do I add to the spec file to do that?

Barry
_______________________________________________
devel mailing list -- devel@lists.fedoraproject.org
To unsubscribe send an email to devel-le...@lists.fedoraproject.org
Fedora Code of Conduct: 
https://docs.fedoraproject.org/en-US/project/code-of-conduct/
List Guidelines: https://fedoraproject.org/wiki/Mailing_list_guidelines
List Archives: 
https://lists.fedoraproject.org/archives/list/devel@lists.fedoraproject.org

Reply via email to