Installing Stackless Python on Debian Lenny
14th July 2009
If you haven’t already heard of Stackless Python and you are creating highly concurrent applications then you must check it out. Unfortunately, Stackless is not available on the Debain repositories so must be compiled from source. The following entry documents my method to get Stackless installed on a production server.
Before we begin downloading and building the source code there are a few dependencies we must install. I shall be using subversion to obtain the latest version of the source. The build essential package contains the various tools need to compile from source. Although not actually required, checkinstall creates a Debain package file and adds the installation to the package database allowing for easy removal. Finally, a stock version of Python is required for the build to be successful. To install these dependencies, issue the following command (as root).
apt-get install subversion build-essential checkinstall python
By default, Lenny ships with Python 2.52 so we shall grab the 2.52 version of Stackless using the this command (as a normal user).
svn checkout http://svn.python.org/projects/stackless/tags/python-2.52/
Next we need to move folder subversion has created and build the software. Issue the following commands as a normal user.
cd python-2.52 ./configure make
Finally we can install Stackless. Although you can just run make install, as I have already suggested I prefer to use checkinstall. The following command should be run as root.
checkinstall -D make install
Checkinstall runs through a few options, it is safe to leave all of these as default however I advise entering a reasonable description.
If all has gone well, you should now have Stackless Python installed. Please be aware that the stock version of Python installed from the repositories will have been overwritten. It is likely that if the package is updated then our Stackless build will be overwritten.