CMoH / gnome15-overlay

Gentoo ebuilds for Gnome15 packages
www.gnome15.org
10 stars 6 forks source link

0.9.6 executables not working with Python 3 as default #14

Closed Delicates closed 11 years ago

Delicates commented 11 years ago

After emerging 0.9.6 ebuild, can't run g15 scripts in an environment with Python 3 being default, e.g.:

    $ g15-config
   Traceback (most recent call last):
     File "/usr/bin/g15-config", line 26, in <module>
       import pygtk
   ImportError: No module named 'pygtk'

The environment configuration is:

    $ eselect python --list
   Available Python interpreters:
     [1]   python2.7
     [2]   python3.3 *

pygtk seems to be available only for Python 2.

After the following update to the scripts they run fine:

   -#!/usr/bin/env python
   +#!/usr/bin/env python2

Perhaps this should be a patch which is part of the ebuild?

CMoH commented 11 years ago

Thanks for reporting; my default python is set to 2.7. Is there any advantage of setting it by default to python3?

In the meantime, I'll try to investigate.

CMoH commented 11 years ago

app-misc/gnome15-0.9.6-r4 should fix the problem. Please close the issue if resolved.

Delicates commented 11 years ago

Thanks for finding a proper way to fix both Python 3 issues. Shebang worked like a charm by fixing all scripts during build to:

   #!/usr/bin/env python2.7
Delicates commented 11 years ago

By the way, I assume there's no way to make this less specific (i.e. "python2" instead of "python2.7") to avoid having to re-emerge gnome15 if a new version of python2.8 comes out?

CMoH commented 11 years ago

I don't think so; those eclasses work with a specific python version. I think you'll have to run python-updater when python2.8 comes out for all packages, not just for gnome15.