Red Hat Bugzilla – Bug 845168
Doesn't build in EL6
Last modified: 2017-10-23 14:48:57 EDT
Description of problem:
When trying to build in EL6, I get the following:
+ /usr/bin/python setup.py build
Traceback (most recent call last):
File "setup.py", line 2, in <module>
from turbogears.finddata import find_package_data
File "/usr/lib/python2.6/site-packages/turbogears/__init__.py", line 10, in <module>
from turbogears.controllers import (absolute_url, expose, flash, validate,
File "/usr/lib/python2.6/site-packages/turbogears/controllers.py", line 19, in <module>
from turbogears import view, database, errorhandling, config
File "/usr/lib/python2.6/site-packages/turbogears/view/__init__.py", line 1, in <module>
from turbogears.view import base
File "/usr/lib/python2.6/site-packages/turbogears/view/base.py", line 31, in <module>
from turbogears.i18n import get_locale, gettext
File "/usr/lib/python2.6/site-packages/turbogears/i18n/__init__.py", line 4, in <module>
from turbogears.i18n.tg_gettext import (gettext, ngettext, install,
File "/usr/lib/python2.6/site-packages/turbogears/i18n/tg_gettext.py", line 8, in <module>
from turbojson.jsonify import jsonify
ImportError: No module named turbojson.jsonify
This is because python-tgcaptcha BuildRequires TurboGears, and TurboGears Requires python-turbojson13
But python-turbojson13 is designed to be parallel installable with the python-turbojson package from RHEL 6.
Toshio (who maintains python-turbojson13) explained ot me on IRC that python-turbojson13 is designed to be parallel installable with the python-turbojson package from RHEL 6, and as such it can't be imported straight away.
So applications are responsible for jumping through a few hoops in order to import it:
>>> __requires__ = ['TurboJson >= 1.3']
>>> import pkg_resources
Then the import works fine.
Attaching a patch to fix the build.
Created attachment 601865 [details]
Fix the build in EL6