Bug 18922 - /usr/lib/rpm/python.req doesnt support relative python module import
Summary: /usr/lib/rpm/python.req doesnt support relative python module import
Status: CLOSED DUPLICATE of bug 17154
Alias: None
Product: Sisyphus
Classification: Development
Component: rpm-build-python (show other bugs)
Version: unstable
Hardware: all Linux
: P2 major
Assignee: Ivan Zakharyaschev
QA Contact: qa-sisyphus
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2009-02-20 19:13 MSK by Eugene Ostapets
Modified: 2009-02-20 19:25 MSK (History)
5 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
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 ***