You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@subversion.apache.org by Aaron Jones <aj...@summithut.com> on 2004/09/11 00:02:35 UTC

python bindings (can't find lswigpy)

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.

  Can anyone help with this?  I'd be forever indebted.  :)

Thanks,
--
A.J.

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@subversion.tigris.org
For additional commands, e-mail: users-help@subversion.tigris.org

Re: python bindings (can't find lswigpy)

Posted by Max Bowsher <ma...@ukf.net>.
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