maemo.org - Talk

maemo.org - Talk (https://talk.maemo.org/index.php)
-   Development (https://talk.maemo.org/forumdisplay.php?f=13)
-   -   [Howto] Force using python2.5 in Scratchbox (https://talk.maemo.org/showthread.php?t=91957)

marmistrz 2013-12-06 19:22

[Howto] Force using python2.5 in Scratchbox
 
Hi,

Scratchbox uses the ancient python 2.3, which fails to use some modules (lacks subprocess & etc.)

The idea is to force using python2.5 instead of all calls to python in a makefile (e.g. debian/rules)

The idea is: If all calls to `python` are redirected to /scratchbox/tools/bin/python, why not to redirect /scratchbox/tools/bin/python. Let's do:

Code:

SBOX_REDIRECT_BINARIES=/scratchbox/tools/bin/python:/usr/bin/python2.5,$SBOX_REDIRECT_BINARIES ./test1.py
It works when executed in a shell. Seems to work decently with in debian/rules (though sometimes seems to have problems)

nieldk 2013-12-06 20:16

Re: [Howto] Force using python2.5 in Scratchbox
 
why not just

Code:

rm /scratchbox/tools/bin/python
ln -s  /usr/bin/python2.5 /scratchbox/tools/bin/python


marmistrz 2013-12-06 21:24

Re: [Howto] Force using python2.5 in Scratchbox
 
Because it doesn't affect your scratchbox installation, can be used in the autobuilder, don't need additional instructions for building...

nieldk 2013-12-06 21:45

Re: [Howto] Force using python2.5 in Scratchbox
 
cool ;)
well thought

jcharpak 2013-12-09 17:25

Re: [Howto] Force using python2.5 in Scratchbox
 
Shouldn't this happen automatically if you're using the appropriate SDK?

marmistrz 2013-12-09 17:28

Re: [Howto] Force using python2.5 in Scratchbox
 
Quote:

Originally Posted by jcharpak (Post 1394123)
Shouldn't this happen automatically if you're using the appropriate SDK?

I'm using apophis, and the built-in python 2.3 is being used.

jcharpak 2013-12-11 03:34

Re: [Howto] Force using python2.5 in Scratchbox
 
So if you install pymaemo what happens then. or do you need to change the build depends to python-2.whatever to actually use 2.whatever

marmistrz 2013-12-11 16:16

Re: [Howto] Force using python2.5 in Scratchbox
 
Quote:

Originally Posted by jcharpak (Post 1394791)
So if you install pymaemo what happens then. or do you need to change the build depends to python-2.whatever to actually use 2.whatever

I'll try it soon

marmistrz 2013-12-17 20:20

Re: [Howto] Force using python2.5 in Scratchbox
 
Well, but pymaemo is simply python2.5 package. And it's there. And still redirected to the scratchbox version

jcharpak 2013-12-17 20:31

Re: [Howto] Force using python2.5 in Scratchbox
 
For some reason I thought installing pymaemo also created a symlink from python to python-2.5 or set some env variable.


All times are GMT. The time now is 02:59.

vBulletin® Version 3.8.8