You are not logged in.

#1 2011-11-02 15:03:16

Renato_Ferreira
Member
Registered: 2010-11-04
Posts: 11

[SOLVED] Building GNOME with Jhbuild and Python

Hi all,

I have been trying to build the GNOME latest code using Jhbuild, however there is one issue I am not being successful to solve: the GNOME source relies on /usr/bin/python, /usr/bin/env python and other referrals to access Python 2, whilst Python 3 has become the standard on Arch.
I have even tried to replace all kinds of paths to python2, but new implicit uses of python keep showing up, so I don't think this would be a solution. And symlinking python would probably break the system.
Has anyone tried to build GNOME and faced this issue, or know how to solve it? I was hoping not to install a secondary distro only to do this. In case I have to, would a clean Arch install rely on Python 3 or would I be able to, in this fresh install, symlink to Python 2?

Thanks,
Renato.

Last edited by Renato_Ferreira (2011-11-02 17:37:01)

Offline

#2 2011-11-02 15:13:04

wonder
Developer
From: Bucharest, Romania
Registered: 2006-07-05
Posts: 5,941
Website

Re: [SOLVED] Building GNOME with Jhbuild and Python

you have to change shebang and then export in jhbuild PYTHON=/usr/bin/python2. i know there is some syntax in ~/.jhbuildrc for that


Give what you have. To someone, it may be better than you dare to think.

Offline

#3 2011-11-02 17:36:06

Renato_Ferreira
Member
Registered: 2010-11-04
Posts: 11

Re: [SOLVED] Building GNOME with Jhbuild and Python

Thanks!
Compiling is just OK for now, more than a half done.
In case anyone needs, that's what I added to ~/.jhbuildrc:

os.environ['PYTHON'] = '/usr/bin/python2'
addpath('PYTHONPATH', '/usr/lib/python2.7/site-packages')
addpath('PYTHONPATH', os.path.join(prefix, 'lib/python2.7/site-packages'))

Offline

#4 2011-11-02 17:52:32

wonder
Developer
From: Bucharest, Romania
Registered: 2006-07-05
Posts: 5,941
Website

Re: [SOLVED] Building GNOME with Jhbuild and Python

Renato_Ferreira wrote:

Thanks!
Compiling is just OK for now, more than a half done.
In case anyone needs, that's what I added to ~/.jhbuildrc:

os.environ['PYTHON'] = '/usr/bin/python2'
addpath('PYTHONPATH', '/usr/lib/python2.7/site-packages')
addpath('PYTHONPATH', os.path.join(prefix, 'lib/python2.7/site-packages'))

can you create a jhbuild wiki and then add it in gnome at the end of the page?


Give what you have. To someone, it may be better than you dare to think.

Offline

#5 2011-11-03 20:04:09

Renato_Ferreira
Member
Registered: 2010-11-04
Posts: 11

Re: [SOLVED] Building GNOME with Jhbuild and Python

Just created it, but added the fix under "Python issues" and mentioned GNOME as an example of causing this error, because it probably happens with any not configured python2 path. Which would be best?

Offline

#6 2011-11-03 20:20:37

wonder
Developer
From: Bucharest, Romania
Registered: 2006-07-05
Posts: 5,941
Website

Re: [SOLVED] Building GNOME with Jhbuild and Python

it's fine like that


Give what you have. To someone, it may be better than you dare to think.

Offline

#7 2011-12-15 13:14:16

davidcollins4481
Member
From: Canton, Ohio
Registered: 2011-08-06
Posts: 7

Re: [SOLVED] Building GNOME with Jhbuild and Python

hmm...just adding those lines:
>os.environ['PYTHON'] = '/usr/bin/python2'
>addpath('PYTHONPATH', '/usr/lib/python2.7/site-packages')
>addpath('PYTHONPATH', os.path.join(prefix, 'lib/python2.7/site-packages'))

is not doing it for me. Configure still finds python 3.2 when I try to build it. Is this not something that anyone here encountered?

Thanks


Hit me up on twitter! @DavidCollins81. Anyone else going to Ohio Linux Fest this September 9 - 11 in Columbus,OH ?

Offline

#8 2012-04-06 14:31:53

camp
Member
From: Vancouver BC
Registered: 2009-01-20
Posts: 16

Re: [SOLVED] Building GNOME with Jhbuild and Python

How can you mark that topic as solved! It's not solved!

Last edited by camp (2012-04-06 14:32:07)

Offline

Board footer

Powered by FluxBB