Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 3700 - Python bindings for GTK/Gnome2 break GTK/Gnome1 bindings
Summary: Python bindings for GTK/Gnome2 break GTK/Gnome1 bindings
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: [OLD] GNOME (show other bugs)
Hardware: x86 Linux
: High normal (vote)
Assignee: Spider (RETIRED)
URL:
Whiteboard:
Keywords:
: 5243 6261 (view as bug list)
Depends on:
Blocks:
 
Reported: 2002-06-13 14:21 UTC by foser
Modified: 2003-02-04 19:42 UTC (History)
5 users (show)

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


Attachments
pygtk-1.99.10 configure patch (pygtk-1.99.10-path-change.diff,477 bytes, patch)
2002-07-03 11:21 UTC, foser
Details | Diff
pygtk-1.99.10 adapted ebuild to incorporate the patch (pygtk-1.99.10.ebuild,1.13 KB, text/plain)
2002-07-03 11:22 UTC, foser
Details
pygtk-1.99.10.ebuild (pygtk-1.99.10.ebuild,1.15 KB, text/plain)
2002-07-07 16:56 UTC, foser
Details
pygtk-1.99.11.ebuild [update] (pygtk-1.99.11.ebuild,1.14 KB, text/plain)
2002-07-12 11:27 UTC, foser
Details
pygtk-1.99.12.ebuild (pygtk-1.99.12.ebuild,1.19 KB, text/plain)
2002-07-30 13:33 UTC, foser
Details
pygtk-1.99.13.ebuild (pygtk-1.99.13.ebuild,1.22 KB, text/plain)
2002-09-04 17:16 UTC, foser (RETIRED)
Details

Note You need to log in before you can comment on or make changes to this bug.
Description foser 2002-06-13 14:21:27 UTC
The python bindings for Gtk/Gnome2 break Gtk/Gnome1 bindings, they use the same
namespaces. There is no solution that i'm aware of, so you can only choose to
use one of the sets of bindings. Using both might lead to fatal errors and
segfaults. Ii have only marginally tested it, but i can assure most Gnome1
scripts will break.

So for Gnome1 the packages installed should be pygtk-0.6.8-r2 or
gnome-python-1.4.1-r4 and for Gnome2 it should be pygtk-1.99.x (in todays state
of the portage tree).

Gnome2 bindings were tested from CVS.
Comment 1 Spider (RETIRED) gentoo-dev 2002-06-14 09:12:45 UTC
we should probably add a conflict between the new and old and new...
Comment 2 foser 2002-06-19 10:28:29 UTC
First problematic ebuild found : ftpcube. It depends on the gnome1 bindings and
it won't work for people testing the gnome2 beta. Maybe add a
<dev-python/pygtk-1.99 dependency ?
Comment 3 Spider (RETIRED) gentoo-dev 2002-06-21 21:42:09 UTC
ftpcube is fixed
Comment 4 foser 2002-07-03 11:20:03 UTC
Ok, as promised here's a solution. A bit late, i've been busy. It's not
beautiful, but it works (at least for me). This one is for pygtk2, it basicly
puts pygtk2 in a non-interfering path so pygtk1 (gnome-python1) doesn't call any
of it's functions/classes (which resulted in all the weird behaviour). To run
pygtk1 programs nothing extra is needed, to run pygtk2 scripts we need to add
the path to pygtk2 in the PYTHONPATH var.

Right now the path for pygtk2 is <python_install_dir>/site-packages/pygtk2/
(normally it would be in <python_install_dir>/site-packages/ ), it seemed
logical to have pygtk2 as the 'harder to reach one' for now : most scripts will
still be GTK1. I suppose we could have some wrapper shellscript to run pygtk2
apps, which basicly only exports the pygtk2 PYTHONPATH and then runs the script.
Make the move from one to the other for users as clean as possible (i don't
think there are any pygtk2 scripts in portage yet).

I've contacted the author about adding install paths configurability to the
config script, right now i do it by patching it. Attached is the diff for in the
pygtk files dir and the updated pygtk-1.99.10 ebuild.

Let me know what you think of this solution and if it's ok with you i can make a
gnome-python2 ebuild as well with the same solution.
Comment 5 foser 2002-07-03 11:21:23 UTC
Created attachment 1935 [details, diff]
pygtk-1.99.10 configure patch
Comment 6 foser 2002-07-03 11:22:16 UTC
Created attachment 1936 [details]
pygtk-1.99.10 adapted ebuild to incorporate the patch
Comment 7 Spider (RETIRED) gentoo-dev 2002-07-03 13:20:30 UTC
sounds like a working solution, I'm having some time off so I'm not commiting at
once.
Comment 8 foser 2002-07-07 16:56:17 UTC
Created attachment 2013 [details]
pygtk-1.99.10.ebuild

Adapted ebuild to add dependency on PyOpenGL ebuild (bug #4658). Also added
license.

Obsoletes the other earlier 1.99.10 ebuild.
Comment 9 foser 2002-07-12 11:27:22 UTC
Created attachment 2205 [details]
pygtk-1.99.11.ebuild [update]

Well, since there's a new version i decided to dump the ebuild here and fix a
dumb mistake i made. Somehow i thought pygtks opengl stuff binded to PyOpenGL,
but it just wants gtkglarea. What the hell was i thinking ? Must've been very
late at night and in a serious sleep deprived state ;) Ah well, one good thing
that came from it is that i submitted an PyOpenGL ebuild (which was quite a
nasty build to get right) :)

Note that i changed the patch name in this ebuild to something more general,
cause it seems to be a not so version specific diff. As soon as this get
submitted in the CVS tree i will submit a gnome-python ebuild.
Comment 10 Brandon Low (RETIRED) gentoo-dev 2002-07-18 09:58:47 UTC
anyone on this bug CC want to work on eroaster?
Comment 11 Spider (RETIRED) gentoo-dev 2002-07-24 00:27:14 UTC
*** Bug 5243 has been marked as a duplicate of this bug. ***
Comment 12 foser 2002-07-30 13:33:41 UTC
Created attachment 2688 [details]
pygtk-1.99.12.ebuild

Here's another version (1.99.12) with some updates. Made deps a bit shorter and
did what i think is the right thing with the opengl dep. If PyOpenGL is not
installed OGL still won't work, altough it's not a direct dependency. I suppose
when you have opengl as use flag, you expect a working solution so i think it
needs to be installed anyway. (PyOpenGL is bug #4658)
Comment 13 foser (RETIRED) gentoo-dev 2002-09-04 17:16:13 UTC
Created attachment 3657 [details]
pygtk-1.99.13.ebuild

The new pygtk development version, now incorporates a different path in it's
configure script so patching as i did in earlier versions is no longer
necessary. The PYTHONPATH now should be set
/usr/lib/pyton2.2/site-packages/gtk-2.0 for pygtk2 scripts to work.

Enabling opengl is possible, but for me it results in breakage due to some path
problems in a gtkglarea.la file. This is imo a problem with the opengl-update
script or the gtkglarea ebuilds and they should be fixed in some way, ill open
a bug/look into that later. It's easy to make a link around the problem if you
really want to use opengl.

gnome-python ebuild also coming up (really this time)
Comment 14 foser (RETIRED) gentoo-dev 2002-10-09 10:55:54 UTC
*** Bug 6261 has been marked as a duplicate of this bug. ***
Comment 15 Spider (RETIRED) gentoo-dev 2002-10-23 11:21:32 UTC
in the tree. Closing