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 704967 - The Python module is not installed where it should
The Python module is not installed where it should
Status: RESOLVED FIXED
Product: gnome-music
Classification: Applications
Component: general
unspecified
Other Linux
: Normal normal
: ---
Assigned To: gnome-music-maint
gnome-music-maint
Depends on:
Blocks:
 
 
Reported: 2013-07-27 03:50 UTC by Mathieu Bridon
Modified: 2013-07-27 07:08 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
Install the Python modules in the arch-independent location (1.49 KB, patch)
2013-07-27 03:54 UTC, Mathieu Bridon
needs-work Details | Review
Install the Python modules in the arch-independent location (1.21 KB, patch)
2013-07-27 05:33 UTC, Mathieu Bridon
reviewed Details | Review

Description Mathieu Bridon 2013-07-27 03:50:43 UTC
The gnomemusic Python module is installed in $(pyexecdir).

For example, on Fedora, this is /usr/lib64/python3.3/site-packages on a 64 bits machine, and /usr/lib/python3.3/site-packages on a 32 bits machine.

However, the module is pure Python, so it is not arch-specific.

As such, it should be installed in $(pythondir), which, on Fedora, is /usr/lib/python3.3/site-packages on all architectures.
Comment 1 Mathieu Bridon 2013-07-27 03:54:26 UTC
Created attachment 250252 [details] [review]
Install the Python modules in the arch-independent location
Comment 2 Mathieu Bridon 2013-07-27 03:58:50 UTC
In case it wasn't clear, I am not saying this is a Fedora-specific issue.

I'm merely using it as an example, because I have no idea what the equivalent paths are on other distributions. :)
Comment 3 Arnel Borja 2013-07-27 05:25:34 UTC
Review of attachment 250252 [details] [review]:

It was using $(pythondir) before, but the code needs to add the path of pygobject to PYTHONPATH (see first 4 lines of gnome-music.in), so I just changed $(pythondir) to $(pyexecdir) to make it work. So, half of what the patch does is probably correct (installing gnome-music to pythondir), but not the adding of $(pythondir) to PYTHONPATH.

It's best to test the patch against a jhbuild in a distro that doesn't have gtk+ 3.8. If Python correctly founds pygobject of jhbuild and gnome-music didn't crash, it is probably correct :)

::: Makefile.am
@@ -57,3 @@
 		-e s!\@localedir\@!$(localedir)!	\
 		-e s!\@pythondir\@!$(pythondir)!	\
-		-e s!\@pyexecdir\@!$(pyexecdir)!	\

Same as in the other note.

::: gnome-music.in
@@ +3,2 @@
 import sys, signal, os, locale, gettext
+sys.path.insert(1, '@pythondir@')

This is the path to pygobject, so it shouldn't be changed back to pythondir. It won't work inside jhbuild.
Comment 4 Mathieu Bridon 2013-07-27 05:33:40 UTC
Created attachment 250253 [details] [review]
Install the Python modules in the arch-independent location

Here's the new version, which fixes the mess I had created with the previous one. :)
Comment 5 Arnel Borja 2013-07-27 06:03:51 UTC
Review of attachment 250253 [details] [review]:

Works in my jhbuild in openSUSE 12.3.
Comment 6 Arnel Borja 2013-07-27 07:05:22 UTC
Committed as b240c347. Thank you for your bug report.