[devel] U: [rpm-build-python3] LC_ALL=en_US.utf8 для python3.compileall.py (was: Безусловный LC_ALL=C в /usr/lib/rpm/functions)

Aleksey Avdeev solo на solin.spb.ru
Чт Фев 21 18:16:22 MSK 2013


19.02.2013 15:04, Aleksey Avdeev пишет:
> 18.01.2013 15:41, REAL пишет:
>> привет!
>>
>> кто-нибудь может подсказать, что изменилось и как теперь с этим жить?
> 
>   См.
> <http://git.altlinux.org/people/ldv/packages/?p=rpm.git;a=commitdiff;h=279f487ca4461fc3cc29bc7eb9ea05a45abba4c1>.
> 
...
> 
>   Похоже, нужна ручка для запрета перекрыия правильного LC_ALL в
> /usr/lib/rpm/functions.

  Цитирую <http://wiki.python.org/moin/Python2orPython3>:

Guido van Rossum (the original creator of the Python language) decided
to clean up Python 2.x properly, with less regard for backwards
compatibility than is the case for new releases in the 2.x range. The
most drastic improvement is the better Unicode support (with all text
strings being Unicode by default) as well as saner bytes/Unicode separation.

  С учётом того, что полный переход на Unicode одна из фишек Python3 --
считаю что байткомпиляциию, для его файлов стоит проводить с
использованием LC_ALL=en_US.utf8.

  Думаю, что стоит это делать через добавление LC_ALL=en_US.utf8 в
строку вызова python3 (/usr/lib/rpm/brp.d/096-bytecompile_python3.brp).

> 
> ...
>> Package: python3-module-pycairo-1.10.1-alt3.git20120819
>> Status: Sisyphus/x86_64 test rebuild failed
> ...
>> /usr/src/tmp/python3-module-pycairo-buildroot using /usr/bin/python3
>> Traceback (most recent call last):
>>   File "/usr/lib/rpm/python3.compileall.py", line 131, in <module>
>>     exit_status = bool(main())
...
>>   File "/usr/lib/rpm/python3.compileall.py", line 60, in executable
>>     line = open(file).readline()
>>   File "/usr/lib64/python3.2/encodings/ascii.py", line 26, in decode
>>     return codecs.ascii_decode(input, self.errors)[0]
>> UnicodeDecodeError: 'ascii' codec can't decode byte 0xc2 in position 14:
>> ordinal not in range(128)
>> error: Bad exit status from /usr/src/tmp/rpm-tmp.27184 (%install)

  Взрыв вызывает выделенный символ:

$ cat src/__init__.py
'''
Copyright © 2003,2010 James Henstridge, Steven Chaplin
          ^

This file is part of pycairo.

...
'''
from ._cairo import *

-- 

С уважением. Алексей.


----------- следующая часть -----------
Было удалено вложение не в текстовом формате...
Имя     : signature.asc
Тип     : application/pgp-signature
Размер  : 897 байтов
Описание: OpenPGP digital signature
Url     : <http://lists.altlinux.org/pipermail/devel/attachments/20130221/31504764/attachment.bin>


Подробная информация о списке рассылки Devel