Erik's Weblog 2.0

February 3, 2006


Compiling Python Bindings for Subversion 1.3.0

I was trying to setup ViewVC to display both my public cvs and subversion repositories. It meant I had compile the swig-py bindings. Subversion 1.3.0 requires SWIG 1.3.24 or later. Or so they say...

I'm using 1.3.27, yet ./configure kept on barfing. Apparently the script does some voodoo magic to parse the current version number. It's failing miserably.

Here is what I did to get it to compile:
cp -p configure configure.orig
sed -e 's/"103025"/"103027"/g' configure.orig > configure
which basically makes a backup copy of the configure script, then replaces the hard-coded version number.

From then on, the regular compilations steps worked:
./configure --with-apr=/usr/local/apache --with-apr-util=/usr/local/apache
make install
make swig-py
make install-swig-py
echo /usr/local/lib/svn-python > /usr/lib/python2.2/site-packages/subversion.pth
Looks simple, but it took a while to figure it all out.