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

Re: python bindings (can't find lswigpy)

From: Max Bowsher <maxb_at_ukf.net>
Date: 2004-09-11 03:11:19 CEST

Aaron Jones wrote:
> Hello All,
>
> I've got a Redhat 9 system with a fresh copy of swig (1.3.22), a
> halfway decent python version (2.2) and trying both the 1.0.6 or
> 1.1.0rc2 subversion installs I can't seem to make this work.
>
> My steps are:
>
> ./conifigure (tried it with and w/o --enable-swig-bindings=python)
> make
> make install
> make swig-py (fails with /usr/bin/ld: cannot find -lswigpy)
>
> ====
>
> I did update swig and read something about the fact that they don't
> build the runtime modules anymore?? I have no clue if this is related.

Indeed. That's exactly the problem.

Fortunately, it's quite easy to build a replacement libswigpy to extend the
compatibility of swig 1.3.22 to apps which haven't caught up to the cutting
edge of swig development yet.

Run this in a temporary directory so you can easily clear up the temporary
files it leaves behind.

You will probably need to arrange to run the last line as root.

You may need to change the PREFIX to wherever you installed swig.

#!/bin/sh
set -ex
PREFIX=/usr
LIBTOOL=libtool
CFLAGS="`python -c 'from distutils import sysconfig
print \"%s -I%s\" % tuple(sysconfig.get_config_vars(\"CFLAGS\",
 \"INCLUDEPY\"))'`"
LIBS="`python -c 'from distutils import sysconfig; import os
print apply(os.path.join, sysconfig.get_config_vars(\"LIBPL\",
\"LDLIBRARY\"))
'`"
swig -runtime -python swigrun.i
$LIBTOOL --mode=compile gcc -O3 -Wall swigrun_wrap.c -o swigpy.o -c $CFLAGS
$LIBTOOL --mode=link gcc -no-undefined -rpath $PREFIX/lib -o libswigpy.la \
swigpy.lo $LIBS
$LIBTOOL --mode=install cp libswigpy.la $PREFIX/lib

Max.

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@subversion.tigris.org
For additional commands, e-mail: users-help@subversion.tigris.org
Received on Sat Sep 11 03:11:56 2004

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