GNOME Bugzilla – Bug 633171
nautilus-python won't work in archlinux
Last modified: 2011-01-13 16:16:21 UTC
Recently Archlinux decided to ship python3000 as default python interpreter. Python2.7 is still present and most applications run ok. python-nautilus, however, broke and it doesn't work anymore. The program will compile fine but it won't execute. The error message is: gg@bio-ggilestr:~/devel/abs/python-nautilus$ n Initializing nautilus-dropbox 0.6.3 Initializing nautilus-image-converter extension Initializing nautilus-open-terminal extension Initializing nautilus-share extension RuntimeError: could not find _PyGtk_API object Traceback (most recent call last):
+ Trace 224339
import nautilus
If I export the path so that nautilus.so is seen, I will get: gg@bio-ggilestr:~/devel/abs/python-nautilus$ export PYTHONPATH=/usr/lib/nautilus-python:$PYTHONPATH gg@bio-ggilestr:~/devel/abs/python-nautilus$ n Initializing nautilus-dropbox 0.6.3 Initializing nautilus-image-converter extension Initializing nautilus-open-terminal extension Initializing nautilus-share extension RuntimeError: could not find _PyGtk_API object Fatal Python error: This module can only be used from nautilus I tried version 0.6.1 and got the same error. Any idea? Thanks.
in archlinux we are using this patch for pygtk: https://bugzilla.gnome.org/show_bug.cgi?id=623965#c4 is fixed some crashes that we encountered in some applications. We had to rebuild some packages that relies on pygtk. In all cases the rebuilding was enough but not for python-nautilus.
here is my patch: http://www.pastethat.com/rhzHp
Can you attach that patch to this issue? The link no longer works.
Wenping's patch is here: http://aur.archlinux.org/packages/python-nautilus/python-nautilus/nautilus-python.patch
Thanks for putting the work into creating this patch. Unfortunately, the problem with using PyCapsule is that it is only available on python 2.7 or greater. It won't work with python 2.6, which a lot of people are still using (not to mention <=2.5), so I can't accept the patch as is. It needs to be reworked to use the old api when the new one is not available. Here is a mailing list entry I found on google that does something like that: http://www.mail-archive.com/libvir-list@redhat.com/msg31003.html I understand if you don't want to work on this, since Arch Linux is onto python 3 now, so if I don't hear from you I'll probably work on it myself when I get the chance.
just a small clarification. Arch Linux supports both versions, python 3 and python2 2.7.
Are you able to compile nautilus-python with python3 with that patch? I'm running Fedora 13 at the moment, with python 2.6 and python 3.1. I cannot compile using python 3.1 because of pygobject, which uses deprecated syntax that doesn't work with python3. How are you getting around this?
Created attachment 178235 [details] [review] patch for 2.7 (also works with 2.6) After re-reading the original post in this thread I realized that the patch was to get nautilus-python to compile under python 2.7, not python 3. I've modified the patch to work with python 2.6, can someone running 2.7 check that it also works with 2.7?
Adam, just checked: your patch will compile and work with python 2.7.1
Thanks guys, sorry it took so long but this is finally fixed ;)