Bug 19979 - Зависимости в TurboGears
Summary: Зависимости в TurboGears
Status: CLOSED FIXED
Alias: None
Product: Sisyphus
Classification: Development
Component: python-module-TurboGears (show other bugs)
Version: unstable
Hardware: all Linux
: P3 normal
Assignee: Ivan Zakharyaschev
QA Contact: qa-sisyphus
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2009-05-07 23:56 MSD by Evgeny Sinelnikov
Modified: 2010-10-07 12:09 MSD (History)
20 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Evgeny Sinelnikov 2009-05-07 23:56:15 MSD
После установки TurboGears недосчитывается зависимостей:

$ tg-admin i18n compile
Traceback (most recent call last):
  File "/usr/bin/tg-admin", line 5, in <module>
    from pkg_resources import load_entry_point
  File "/usr/lib/python2.5/site-packages/pkg_resources.py", line 2562, in <module>
    working_set.require(__requires__)
  File "/usr/lib/python2.5/site-packages/pkg_resources.py", line 626, in require
    needed = self.resolve(parse_requirements(requirements))
  File "/usr/lib/python2.5/site-packages/pkg_resources.py", line 524, in resolve
    raise DistributionNotFound(req)  # XXX put more info here
pkg_resources.DistributionNotFound: TurboKid>=1.0.4

Устанавливаем python-module-turbokid:

[sin@server TurboGears.egg-info]$ tg-admin i18n compile
Traceback (most recent call last):
  File "/usr/bin/tg-admin", line 5, in <module>
    from pkg_resources import load_entry_point
  File "/usr/lib/python2.5/site-packages/pkg_resources.py", line 2566, in <module>
    parse_requirements(__requires__), Environment()
  File "/usr/lib/python2.5/site-packages/pkg_resources.py", line 524, in resolve
    raise DistributionNotFound(req)  # XXX put more info here
pkg_resources.DistributionNotFound: TurboJson>=1.1.4,<1.2

Проверяем:
$ grep TurboJson /usr/lib/python2.5/site-packages/TurboGears-1.0.8-py2.5.egg-info/requires.txt
TurboJson >= 1.1.4, < 1.2
TurboJson >= 1.1.4, < 1.2

Устраняем:
$ grep TurboJson /usr/lib/python2.5/site-packages/TurboGears-1.0.8-py2.5.egg-info/requires.txt
TurboJson >= 1.1.4
TurboJson >= 1.1.4, < 1.2

Получаем:
$ tg-admin i18n compile
Traceback (most recent call last):
  File "/usr/bin/tg-admin", line 5, in <module>
    from pkg_resources import load_entry_point
  File "/usr/lib/python2.5/site-packages/pkg_resources.py", line 2562, in <module>
    working_set.require(__requires__)
  File "/usr/lib/python2.5/site-packages/pkg_resources.py", line 626, in require
    needed = self.resolve(parse_requirements(requirements))
  File "/usr/lib/python2.5/site-packages/pkg_resources.py", line 524, in resolve
    raise DistributionNotFound(req)  # XXX put more info here
pkg_resources.DistributionNotFound: TurboCheetah>=1.0

Устанавливаем python-module-turbocheetah:
$ tg-admin i18n compile
Traceback (most recent call last):
  File "/usr/bin/tg-admin", line 5, in <module>
    from pkg_resources import load_entry_point
  File "/usr/lib/python2.5/site-packages/pkg_resources.py", line 2562, in <module>
    working_set.require(__requires__)
  File "/usr/lib/python2.5/site-packages/pkg_resources.py", line 626, in require
    needed = self.resolve(parse_requirements(requirements))
  File "/usr/lib/python2.5/site-packages/pkg_resources.py", line 524, in resolve
    raise DistributionNotFound(req)  # XXX put more info here
pkg_resources.DistributionNotFound: PasteScript>=1.6.

Устанавливаем python-module-PasteScript:
$ tg-admin i18n compile
Traceback (most recent call last):
  File "/usr/bin/tg-admin", line 5, in <module>
    from pkg_resources import load_entry_point
  File "/usr/lib/python2.5/site-packages/pkg_resources.py", line 2562, in <module>
    working_set.require(__requires__)
  File "/usr/lib/python2.5/site-packages/pkg_resources.py", line 626, in require
    needed = self.resolve(parse_requirements(requirements))
  File "/usr/lib/python2.5/site-packages/pkg_resources.py", line 524, in resolve
    raise DistributionNotFound(req)  # XXX put more info here
pkg_resources.DistributionNotFound: DecoratorTools>=1.4

Устанавливаем python-module-decoratortools:
$ tg-admin i18n compile
Traceback (most recent call last):
  File "/usr/bin/tg-admin", line 5, in <module>
    from pkg_resources import load_entry_point
  File "/usr/lib/python2.5/site-packages/pkg_resources.py", line 2562, in <module>
    working_set.require(__requires__)
  File "/usr/lib/python2.5/site-packages/pkg_resources.py", line 626, in require
    needed = self.resolve(parse_requirements(requirements))
  File "/usr/lib/python2.5/site-packages/pkg_resources.py", line 524, in resolve
    raise DistributionNotFound(req)  # XXX put more info here
pkg_resources.DistributionNotFound: ConfigObj>=4.3.2

Пытаемся установить python-module-configobj:
[...]
file /usr/lib/python2.5/site-packages/configobj.py from install of python-module-configobj-4.5.3-alt1 conflicts with file from package python-module-matplotlib-0.98.3-alt3
file /usr/lib/python2.5/site-packages/configobj.pyc from install of python-module-configobj-4.5.3-alt1 conflicts with file from package python-module-matplotlib-0.98.3-alt3
file /usr/lib/python2.5/site-packages/configobj.pyo from install of python-module-configobj-4.5.3-alt1 conflicts with file from package python-module-matplotlib-0.98.3-alt3
E: Ошибка во время исполнения транзакции

Проверяем
$ grep ConfigObj /usr/lib/python2.5/site-packages/TurboGears-1.0.8-py2.5.egg-info/requires.txt
ConfigObj >= 4.3.2
ConfigObj >= 4.3.2

Отрвываем, как в федоре, ибо не нужен:
$ grep ConfigObj /usr/lib/python2.5/site-packages/TurboGears-1.0.8-py2.5.egg-info/requires.txt
ConfigObj >= 4.3.2

Получаем:
$ tg-admin i18n compile
Traceback (most recent call last):
  File "/usr/bin/tg-admin", line 5, in <module>
    from pkg_resources import load_entry_point
  File "/usr/lib/python2.5/site-packages/pkg_resources.py", line 2566, in <module>
    parse_requirements(__requires__), Environment()
  File "/usr/lib/python2.5/site-packages/pkg_resources.py", line 528, in resolve
    raise VersionConflict(dist,req) # XXX put more info here
pkg_resources.VersionConflict: (simplejson 1.7.4 (/usr/lib/python2.5/site-packages), Requirement.parse('simplejson>=1.9.1'))

Устанавливаем python-module-simplejson:
$ tg-admin i18n compile
Traceback (most recent call last):
  File "/usr/bin/tg-admin", line 5, in <module>
    from pkg_resources import load_entry_point
  File "/usr/lib/python2.5/site-packages/pkg_resources.py", line 2566, in <module>
    parse_requirements(__requires__), Environment()
  File "/usr/lib/python2.5/site-packages/pkg_resources.py", line 528, in resolve
    raise VersionConflict(dist,req) # XXX put more info here
pkg_resources.VersionConflict: (simplejson 1.7.4 (/usr/lib/python2.5/site-packages), Requirement.parse('simplejson>=1.9.1'))

Проверяем:
$ rpm -q python-module-simplejson
python-module-simplejson-1.7.4-alt1.1

Обновляем (это, я вам скажу, оказалась не тривиальная операция):
git://git.altlinux.org/people/sin/packages/simplejson.git

Получаем:
$ tg-admin i18n compile
Traceback (most recent call last):
  File "/usr/bin/tg-admin", line 5, in <module>
    from pkg_resources import load_entry_point
  File "/usr/lib/python2.5/site-packages/pkg_resources.py", line 2562, in <module>
    working_set.require(__requires__)
  File "/usr/lib/python2.5/site-packages/pkg_resources.py", line 626, in require
    needed = self.resolve(parse_requirements(requirements))
  File "/usr/lib/python2.5/site-packages/pkg_resources.py", line 524, in resolve
    raise DistributionNotFound(req)  # XXX put more info here
pkg_resources.DistributionNotFound: PEAK-Rules>=0.5a1.dev-r2555

У нас python-module-peak-0.5-alt1.alpha4.svn.2590
....

Всё... Пока я иссяк...
Comment 1 Denis Klimov 2009-05-08 21:44:55 MSD
Этот пакет я собирал для того чтобы запустить openerp-web. У меня ваша команда отрабатывает так:
zver@msi /tmp/tg % tg-admin quickstart
[...]
zver@msi /tmp/tg % cd Test
zver@msi /tmp/tg/Test % tg-admin i18n compile

/usr/lib/python2.5/site-packages/RuleDispatch-0.5a1.dev_r2506-py2.5-linux-i686.egg/dispatch/__init__.py:98: Warning: 'as' will become a reserved keyword in Python 2.6
/usr/lib/python2.5/site-packages/RuleDispatch-0.5a1.dev_r2506-py2.5-linux-i686.egg/dispatch/predicates.py:239: Warning: 'as' will become a reserved keyword in Python 2.6
/usr/lib/python2.5/site-packages/RuleDispatch-0.5a1.dev_r2506-py2.5-linux-i686.egg/dispatch/predicates.py:263: Warning: 'as' will become a reserved keyword in Python 2.6
/usr/lib/python2.5/site-packages/RuleDispatch-0.5a1.dev_r2506-py2.5-linux-i686.egg/dispatch/predicates.py:281: Warning: 'as' will become a reserved keyword in Python 2.6

Правда говоря у меня на рабочей машине уже не совсем rpm-only.
Сам разработкой на TG не занимаюсь. Не могли бы вы предоставить список команда до tg-admin i18n compile, возможно вы что то делали не так как я?

В ближайшее время проверю в VE.


P.S. свежую версию python-module-simplejson отправьте в сизиф, не помешает ;) или попросите об этом Генадия.
Comment 2 Repository Robot 2010-10-06 18:08:06 MSD
python-module-TurboGears-1.0.9-alt2 -> sisyphus:

* Wed Oct 06 2010 Vitaly Lipatov <lav@altlinux> 1.0.9-alt2
- fix requires (ALT bug #19979)

* Wed Oct 06 2010 Vitaly Lipatov <lav@altlinux> 1.0.9-alt1
- new version (1.0.9) import in git
Comment 3 Vitaly Lipatov 2010-10-07 12:09:03 MSD
Теперь у меня получается так:
$ tg-admin i18n compile
/usr/lib/python2.6/site-packages/cherrypy/lib/cptools.py:3: DeprecationWarning: the md5 module is deprecated; use hashlib instead
  import md5
/usr/lib/python2.6/site-packages/cherrypy/filters/sessionfilter.py:33: DeprecationWarning: the sha module is deprecated; use the hashlib module instead
  import sha
/usr/lib/python2.6/site-packages/sqlobject/converters.py:165: DeprecationWarning: the sets module is deprecated
  from sets import Set, ImmutableSet
/usr/lib/python2.6/site-packages/dispatch/predicates.py:379: DeprecationWarning: object.__new__() takes no parameters
  return ExprBase.__new__(klass,function,*argexprs)
This command needs to be run from inside a project directory