Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 283275 - dev-python/pygtk doesn't work with Python <2.6 when >=dev-python/pycairo-1.8.4 is installed
Summary: dev-python/pygtk doesn't work with Python <2.6 when >=dev-python/pycairo-1.8....
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All All
: High normal (vote)
Assignee: Gentoo Linux Gnome Desktop Team
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2009-08-30 20:12 UTC by Arfrever Frehtes Taifersar Arahesis (RETIRED)
Modified: 2010-06-27 23:49 UTC (History)
2 users (show)

See Also:
Package list:
Runtime testing required: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Arfrever Frehtes Taifersar Arahesis (RETIRED) gentoo-dev 2009-08-30 20:12:45 UTC
>=dev-python/pycairo-1.8.4 supports only Python >=2.6. dev-python/pycairo belongs to dependencies of dev-python/pygtk. When dev-python/pygtk has been built for Python <2.6, then importing gtk fails in these versions of Python.

$ python2.5 -c 'import gtk'
Traceback (most recent call last):
  File "<string>", line 1, in <module>
  File "/usr/lib64/python2.5/site-packages/gtk-2.0/gtk/__init__.py", line 40, in <module>
    from gtk import _gtk
ImportError: No module named cairo
$

I suggest to work around this problem by requiring Python >=2.6 in >=dev-python/pygtk-2.16.0.
Comment 1 Gilles Dartiguelongue (RETIRED) gentoo-dev 2009-08-30 22:43:55 UTC
that's a known bug of pretty much all gnome python modules, see bug #262241.
The work around is to have only one python installed and run python-updater to make sure all gnome modules are built against the available python.

*** This bug has been marked as a duplicate of bug 262241 ***
Comment 2 Arfrever Frehtes Taifersar Arahesis (RETIRED) gentoo-dev 2009-09-01 02:59:59 UTC
(In reply to comment #1)

Actually it's a different problem. When Python 2.5 is the only installed version of Python, then it is impossible to build >=dev-python/pycairo-1.8.4 and all its non-optional reverse dependencies like dev-python/pygtk. This problem can be fixed after deletion of <dev-python/pycairo-1.8.4.
Comment 3 Daniel Gryniewicz (RETIRED) gentoo-dev 2009-09-08 15:22:57 UTC
Wait.  >=pycairo-1.8.4 depends on python-2.6, so you cannot have it installed with only 2.5.  Since gnome only supports one python version, you will need to have everything built against 2.6 in order to have 1.8.4.  Right?
Comment 4 Arfrever Frehtes Taifersar Arahesis (RETIRED) gentoo-dev 2009-09-08 15:38:22 UTC
(In reply to comment #3)
> >=pycairo-1.8.4 depends on python-2.6, so you cannot have it installed
> with only 2.5.

Yes. My suggestion was to prevent some minor problems when e.g. both 2.5 and 2.6 are installed.

> you will need to have everything built against 2.6 in order to have 1.8.4. 

Yes. GNOME Python modules will have to restrict <2.6 to avoid breaking ABI dependency graph (noticeable with EAPI >= 4).
Comment 5 Arfrever Frehtes Taifersar Arahesis (RETIRED) gentoo-dev 2010-06-27 23:48:59 UTC
<dev-python/pycairo-1.8.4 is no longer in the tree, so I have disabled support for Python <2.6 in dev-python/pygtk-2.16.0-r1.