Edgewall Software

Trac 0.10 in Ubuntu Feisty with Python 2.5

As noted in TracInstall, to make Trac 0.10 work with Python2.5, it is necessary to have Clearsilver version 0.10.4 installed. Below I report my experiences withTrac 010 version with Python2.5

I have installed Trac 0.10.3 in Ubuntu Feisty (current development version of ubuntu, that will become version 0704 next month), in both x86 and x86_64 (amd64) architectures. Trac version in Ubuntu (and Debian) repos is compiled with Clearsilver 010.3. Ubuntu Feisty uses Python2.5 in a preferential way, although it still installs Python2.4 too.

In x86, Trac worked ok, even with Python2.5, with several plugins installed without any glitch. In x86_64, there is an error in the build process of python-clearsilver, in that the same version of a lib module is installed for Python2.4 and Python2.5, and that module (neo_cgi.so) does not work in Python2.5. As alternatives you can force Ubuntu to use Python2.4 and everything works.

Installing Clearsilver 0.10.4

Clearsilver 0.10.3 do not run in Python2.5 x86_64. In the change logs of version 0.10.4, there is references to serious bugs reported by Gentoo people, that were corrected in the new version.

Clearsilver Version 0.10.4 is not yet available in repositories for Debian and Ubuntu. To use it, it is necessary to download from official repository.

It can be easily installed using traditional Linux way of configure/make/make install.

Only 3 little adjustments:

  • 2 files need to be adjusted to allow version 2.5 of Python to be used as below
  • in Ubuntu (and Debian), if you have Ruby installed, there is another dependency not checked by Clearsilver build/install process, to be corrected
  • As described here, you also need to have some python development packages

Files to be adjusted

configure

add "2.5" to the list of python version allowed as bellow

python_versions="2.5 2.4 2.3 2.2 2.1 2.0 1.5 24 23 22 21 20 15"

configure.in

add "2.5" to the list of python version allowed as bellow

python_versions="2.5 2.4 2.3 2.2 2.1 2.0 1.5 24 23 22 21 20 15"

Original lines do not have the 2.5 I have added.

Note: Attached a patch clearsilver-sucks.diff against CS 0.10.4. Includes the change above plus another which stops CS installing neo_cgi.so in /usr/lib/python2.5/site-packages/site-packages/. Useful.

Install Ruby development packages

If you Ruby installed, it could be necessary install development packages for Ruby to get a required util (mkmf) for building Ruby interface1.8-dev. Again in Ubuntu just do:

sudo apt-get install ruby1.8-dev

It is possible that some other parts have to be added if you have C# (mono) installed. I tried to disable Ruby and C# interface build in configure step, but the disable switches did not worked.

With Python Clearsilver module in Python2.5 site-packages dir, Trac is working ok all the day in a Python2.5 x86_64 environment.

Install required python development headers

peterdv says: In addition to the comment from Antonio Censi, I had to:

sudo apt-get install zlib1g-dev
sudo apt-get install autoconf
sudo apt-get install python-dev

Workaround from the Ubuntu Bug-tracker

From Ubuntu Launchpad bug 86685:

Install the build dependencies
$ sudo apt-get build-dep python-clearsilver
$ sudo apt-get install python-dev

Download the 0.10.4 version (as it contains fixes for python2.5)
$ wget http://www.clearsilver.net/downloads/clearsilver-0.10.4.tar.gz
$ tar xzvf clearsilver-0.10.4.tar.gz

Edit the configure files as listed by Antonio Censi above

Build the new version
$ cd clearsilver-0.10.4
$ ./configure --with-python=/usr/bin/python2.5
$ make
$ sudo make install
Last modified 7 years ago Last modified on Jul 12, 2007 2:29:03 AM

Attachments (1)

Download all attachments as: .zip