[Nix-dev] python and gtk + reqruire(2.0)

Marc Weber marco-oweber at gmx.de
Sat Nov 29 04:51:31 CET 2008


I've posted a first version of a python rewrite proposal recently.

I've had several problems. I'm not sure which is the best way to solve
this one:

python lets you install multiple gtk versions. That's why you imort it
this way:

import pygtk
pygkt.require('2.0') # this just adds a */gtk-2.0 to sys.path (the import directory list)
import gtk ..        # those packages reside in */gtk-2.0

That's all fine and funny if you have one directory where you put in all
the packages. The joy ends if for example
pygobject and pygkt can be installed in diffirent store paths but when
running import gtk the path of pygobject/**/gtk is added to sys.path and
not pygtk/**/gtk..

Right now I've "fixed" this by installing multiple packages into the
same store path. Those are:
 * pygtk
 * pygojbect
 * gnome-python
 * gnome-python-extras
 * gnome-deskop

Eg pygtk can be configured differently. In general I'd perfer having
different store paths. But forcing this would either require to assemble
all libs in ~/.nix-profile so that they work again (do they?) or patch
them so that pygtk.reqruire('2.0') iterates over all NIX_PYTHON_SITES to
add multiple packages. The latter could be annoying if you start having
hundreds of packages (do so many exist?)

So do you think it would be worth spending the time on patching this?
Or is it fine to have 5 packages in one store path?

Thanks
Marc Weber



More information about the nix-dev mailing list