[sword-devel] Python and swig
bburton at mail.com
Thu Jan 25 00:48:21 MST 2007
I too had issues attempting to use SWIG. See below ...
On 1/24/07, Pierre Amadio <pierre.amadio at libertysurf.fr> wrote:
> I am afraid i do not understand how to use the python bindings the
> README in the source talk about.
> I have compiled sword with --with-python option and was expecting some
> python module to be autmatically build.
> The bindings/swig directory does not seem to have been changed, nor
> anything compiled in it.
> I would appreciate any hints that could led me to access sword with
A little while ago when attempting to create SWIG Ruby bindings for
Sword, I did much looking through the archives of this list to try and
find how to build the bindings for any of the supported languages.
Although I've had experience building many applications by running
configure, I had not when configure needed to be generated. What I
eventually found below worked for me on RedHat Linux ES 3.
This assumes you've already built and installed Sword itself, you have
SWIG, autoconf and automake installed. My system had the latter two
but for SWIG, I downloaded the tar file, built and installed it.
1. From the Sword base directory where the .tar.gz file was extracted,
2. Edit configure.ac and correct the Sword version number in two
places, AC_INIT and
AM_INIT_AUTOMAKE. The variable SW_CHECK_SWORD refers to the lowest
supported version of the Sword libraries.**
3. ./autogen.sh (in my case, there's an error: aclocal.m4:774: required
file `./ltmain.sh' not found which could be because I have an
older version of automake)
4. ./configure If necessary, specify other options such as --prefix
See configure --help for more information.
5. Make. If you just run make, it will create Makefiles for all the
language bindings found
6. Generate the SWIG bindings and setup.py:
7. Build the SWIG bindings:
8. Install Python Sword bindings:
cd python; sudo ./setup.py
** A note to the Sword maintainers. Please add this step to your
release checklist. In addition, run autogen.sh so there will already
be a generated configure script.
> Pierre Amadio
I hope this helps.
More information about the sword-devel