Bug 18922

Summary: /usr/lib/rpm/python.req doesnt support relative python module import
Product: Sisyphus Reporter: Eugene Ostapets <eostapets>
Component: rpm-build-pythonAssignee: Ivan Zakharyaschev <imz>
Status: CLOSED DUPLICATE QA Contact: qa-sisyphus
Severity: major    
Priority: P2 CC: darktemplar, george, imz, ldv, mek
Version: unstable   
Hardware: all   
OS: Linux   

Description Eugene Ostapets 2009-02-20 19:13:12 MSK
Питон с версии 2.5 поддерживает синтаксис "относительного" иморта:
http://www.python.org/dev/peps/pep-0328/ 


Пример кода:
from .. import MODULE_SUCCESS


Наш /usr/lib/rpm/python.req валист со следующей ошибкой на таком коде:
Traceback (most recent call last):
  File "/usr/lib/rpm/python.req.py", line 206, in <module>
    for item in match(lis) :
  File "/usr/lib/rpm/python.req.py", line 99, in match
    for item in match(node,deep) :
  File "/usr/lib/rpm/python.req.py", line 99, in match
    for item in match(node,deep) :
  File "/usr/lib/rpm/python.req.py", line 99, in match
    for item in match(node,deep) :
  File "/usr/lib/rpm/python.req.py", line 88, in match
    deps.append(node[2][1][1])
IndexError: string index out of range
find-requires: ERROR: /usr/lib/rpm/python.req failed
ошибка: /bin/sh не удалось
ошибка: Невозможно найти Requires
Comment 1 Dmitry V. Levin 2009-02-20 19:25:32 MSK
dup

*** This bug has been marked as a duplicate of bug 17154 ***