How to get python 2.4 or 2.5 for Ubuntu 10.4
2010 avril 30 Un commentaire
Each new version of an OS carries its bad news. The last version of Ubuntu doesn’t embed neither Python 2.4 nor Python 2.5. Nevertheless until all your Plone sites will be migrated to Plone 4 you will need a Python 2.4 version somewhere.
Method 1: search for sources to get binary packages
There is a Python 2.4 « branch » in Ubuntu on launchpad : “python2.4” source package in Lucid. If you now a little how Ubuntu packaging work you can easyly get Ubuntu package of Python 2.4 by following steps below:
- Click on Show builds
- Choose Successfully built then apply the filter
- Then choose your the archive for your architecture (often i386 or amd64)
There you have python2.4 and python2.4-dev packages.
Method 2: Use packages search tool
Launchap also have a package search tool for all Ubuntu releases. This one doesn’t limit itself to packages disbributed in official Ubuntu repositories and it also give results for all packages build using the Launchad system.
In our case we can use:
Method 3: Get sources and create your own packages
Once these to files downloaded you will do following steps:
- Unarchive python sources: tar zxf python2.4_2.4.6.orig.tar.gz
- Uncompress the patch: gunzip python2.4_2.4.6-1ubuntu5.diff.gz
- Apply the patch: patch -p0 < python2.4_2.4.6-1ubuntu5.diff
- Go in the folder created: cd python2.4-2.4.6
- Try to build the package: dpkg-buildpackage
- Install libreadline5-dev or fix the debian/control file by replacing libreadline5-dev by libreadline-dev (I’m nasty)
- Install all dependencies required (why do you need emacs and bluetooth to compile python ?): apt-get install libncursesw5-dev tk8.5-dev libdb4.6-dev libgdbm-dev blt-dev libbluetooth-dev emacs23 debiandoc-sgml
- Try again to build the package: dpkg-buildpackage
I don’t know how long these packages will be available.