[sword-devel] Building sword python binding

Dale Ogilvie pnyli0002 at sneakemail.com
Fri Jul 6 21:34:15 MST 2007


Hello,

Here's what I did to compile the python bindings for sword for the 1.5.9 
release version of sword. This was on ArchLinux (www.archlinux.org).

Upgrade to swig 1.3.31 or higher which supports python 2.5. This resolves a 
compilation error caused by a const char*/char* mismatch.

tar xzvf sword-1.5.9.tar.gz

From the Sword base directory where the .tar.gz file was extracted:
cd bindings/swig/package

Edit configure.ac and correct the Sword version number in three places. 
AC_INIT, AM_INIT_AUTOMAKE and the variable SW_CHECK_SWORD refers to the 
lowest supported version of the Sword libraries. Bump it to 1.5.9.

Add libtoolize to the start of autogen.sh to resolve ./ltmain.sh not found

./autogen.sh

./configure 

make pythonswig (required to generate Sword.cxx)

make

chmod +x python/setup.py

cd python; sudo ./setup.py install

Regards

Dale





More information about the sword-devel mailing list