[svn.haxx.se] · SVN Dev · SVN Users · SVN Org · TSVN Dev · TSVN Users · Subclipse Dev · Subclipse Users · this month's index

quick-n-dirty script for building bindings against multiple python versions

From: Edward S. Marshall <esm_at_logic.net>
Date: 2002-11-22 22:46:26 CET

Hi,

For the benefit of the archives (in case someone else really wants to
try doing this), I've attached below a little script that automatically
builds and installs subversion with python bindings built for both
Python 1.5.2 and 2.2 (which I've been using to ensure compatibility with
SubWiki). It's terribly specific to my environment, but maybe someone
will find it handy.

I've put a few RPMs of python 1.5.2 and SWIG 1.3.16 on my website for
Red Hat 8.0 if anyone needs them (I expect these might be more useful
than the script ;-):

        http://esm.logic.net/projects/svn/rh8-misc/

This script assumes that subversion is being installed to /opt/dev, and
that there's a version of swig built for Python 1.5.2 in /opt/swig
(where it installs the svn swig libraries).

-- 
Edward S. Marshall <esm@logic.net>
http://esm.logic.net/
#!/bin/sh
[ $[`id -u`] != 502 ] && \
  echo "Please run this script as user 'svn'." && \
  exit 1
set -x
TOPDIR=/opt/dev/src/subversion
LIBDIR=/opt/dev/lib
SWIGLIBDIR=/opt/swig/lib
BINDIR=/opt/dev/bin
# Build everything using with Python 1.5 bindings.
[ -f Makefile ] && make external-clean local-distclean
cd ${TOPDIR}
LD_LIBRARY_PATH=/opt/swig/lib PATH=/opt/swig/bin:$PATH \
  sh autogen.sh
LD_LIBRARY_PATH=/opt/swig/lib PATH=/opt/swig/bin:$PATH \
  ./configure --prefix=/opt/dev --enable-maintainer-mode \
    --with-swig=/opt/swig
# Clean up Makefile to refer to Python 1.5, not Python 2.2.
cat Makefile | \
  sed -e 's/python2\.2/python1.5/g' | \
  sed -e 's/python2/python1/g' > Makefile.1
mv Makefile.1 Makefile
LD_LIBRARY_PATH=/opt/swig/lib PATH=/opt/swig/bin:$PATH \
  make clean all install swig-py-ext install-swig-py-ext
[ -d ${LIBDIR}/python1.5 ] && mv ${LIBDIR}/*swig* ${SWIGLIBDIR}
# Build again, this time with Python 2.2 bindings. Only install the
bindings.
[ -f Makefile ] && make local-distclean
cd ${TOPDIR}
sh autogen.sh
./configure --prefix=/opt/dev --enable-maintainer-mode
make clean external-all swig-py-lib install-swig-py-lib swig-py-ext
install-swig-py-ext
# EOF

Received on Fri Nov 22 22:47:14 2002

This is an archived mail posted to the Subversion Dev mailing list.

This site is subject to the Apache Privacy Policy and the Apache Public Forum Archive Policy.