After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 633171 - nautilus-python won't work in archlinux
nautilus-python won't work in archlinux
Status: RESOLVED FIXED
Product: nautilus-python
Classification: Other
Component: general
0.7.x
Other Linux
: Normal major
: ---
Assigned To: Adam Plumb
Adam Plumb
Depends on:
Blocks:
 
 
Reported: 2010-10-26 10:39 UTC by Giorgio Gilestro
Modified: 2011-01-13 16:16 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
patch for 2.7 (also works with 2.6) (977 bytes, patch)
2011-01-13 15:15 UTC, Adam Plumb
none Details | Review

Description Giorgio Gilestro 2010-10-26 10:39:32 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):
  • File "/home/gg/.nautilus/python-extensions/submenu.py", line 1 in <module>
    import nautilus
ImportError: No module named 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.
Comment 1 Ionut Biru 2010-10-26 16:02:06 UTC
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.
Comment 2 Wenping Guo 2010-12-23 08:42:57 UTC
here is my patch:

http://www.pastethat.com/rhzHp
Comment 3 Adam Plumb 2011-01-10 21:30:07 UTC
Can you attach that patch to this issue?  The link no longer works.
Comment 4 Giorgio Gilestro 2011-01-10 22:04:51 UTC
Wenping's patch is here:
http://aur.archlinux.org/packages/python-nautilus/python-nautilus/nautilus-python.patch
Comment 5 Adam Plumb 2011-01-11 13:01:27 UTC
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.
Comment 6 Ionut Biru 2011-01-11 13:18:23 UTC
just a small clarification. Arch Linux supports both versions, python 3 and python2 2.7.
Comment 7 Adam Plumb 2011-01-12 20:47:51 UTC
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?
Comment 8 Adam Plumb 2011-01-13 15:15:33 UTC
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?
Comment 9 Giorgio Gilestro 2011-01-13 15:25:39 UTC
Adam,
just checked: your patch will compile and work with python 2.7.1
Comment 10 Adam Plumb 2011-01-13 16:16:21 UTC
Thanks guys, sorry it took so long but this is finally fixed ;)