PDA

View Full Version : Python 2.4 on N800


bobpaul
2007-01-29, 13:37
I've noticed a lot of software that require Python 2.4, but the only Python runtime I can find is 2.5, and curiously, after installing 2.5, new software still compains about needing 2.4 to install.

I thought Python was like Java in that newer runtimes could run older apps just fine. Is it just that the packages were made with a strict dependancy for "=2.4" when they should have been ">=2,4"? Or is it possible that they really do need 2.4? If that's the case, whee can I get the 2.4 runtime for Maemo?

ssam
2007-01-29, 13:48
python has very good backwards compatability, so almost 2.4 python program will run 2.5. (python modules and libraries are more likely to be version dependant, as they use lower level parts of python).

these days most of the libraries have been ported so everything should work fine.

the deb packages however often specify a specific version.

bobpaul
2007-01-29, 13:56
SSo I should e-mail the developers and ask them to please repackage requiring 2.4 or
greater?

yerga
2007-01-29, 17:38
The problem is that python packages are python2.4 or python2.5
Then if your pack an application for python2.4 it will not work with python2.5, since the packages are not compatible. You cannot put python (> =2.4) because the package python does not exist. I think that this is like that.

I suppose that applications will use python2.5, it's a question of time. But until then, we developers have an eternal dilemma :)

Best Regards.

pycage
2007-01-29, 17:42
The problem is that python packages are python2.4 or python2.5
Then if your pack an application for python2.4 it will not work with python2.5, since the packages are not compatible. You cannot put python (> =2.4) because the package python does not exist. I think that this is like that.

I suppose that applications will use python2.5, it's a question of time. But until then, we developers have an eternal dilemma :)

Best Regards.

Exactly. The numbers in python2.4 and python2.5 packages for Maemo are not version numbers but part of the name. Stupid choice by the packagers, IMHO.

I solved this issue by having my project depend on "python2.4 | python2.5". The code runs unchanged on both versions.

RogerS
2007-01-29, 19:51
Not being a Python person, I'm really only asking rhetorically, but . . . what happens when Python 2.6 arrives?

Same song, different verse, right?

pycage
2007-01-29, 20:31
Not being a Python person, I'm really only asking rhetorically, but . . . what happens when Python 2.6 arrives?

Same song, different verse, right?

Unfortunately yes, if the maemo package system hasn't changed until then...

bobpaul
2007-01-30, 07:03
I suppose then we need a "python" package with a version number either 2.4 or 2.5 depending on what it is, and then a virtual package for both "python2.4" and "python2.5" to maintain compatibility with current package dependencies. I guess if the python runtime truly is minor version backward compatible both of these virtual packages could just point to the current python package as it doesn't matter so much if the runtime is newer.

It looks like the python2.4 package is in the repository.maemo.org under the mistral dist. Now I'm not sure where the python2.5 package is, but it must be one of the bora repositories. For the time being, I suppose I'll just use the 2.4 runtime...

pycage
2007-01-30, 14:44
Python 2.5 is backward compatible with 2.4, but the hildon API shipped with the 2.5 runtime changed a bit. It changed not much, but could result in programs written for 2.4 not running with 2.5.
However, if you keep compatibility in mind while developing, there are no problems.

yerga
2007-01-30, 18:55
I solved this issue by having my project depend on "python2.4 | python2.5". The code runs unchanged on both versions.

Thank you very much. It was something that I was searching for haven't these problems.

Best Regards.