[sword-devel] Python and swig

Ben Morgan benpmorgan at gmail.com
Wed Jan 24 19:43:20 MST 2007


I have been working with python + SWORD for quite a while, but under
However, I have also tried to build with MSYS (which I have done with a
little tweaking).

What I think you need to do (presuming you are under linux), is go to
bindings/swig/oldmake, and pull out makefile.am. Put this in bindings/swig
and rename it as  makefile

As there is no configure script for this, you will need to do manual
substitution of some terms.
First, if you want only python, remove the tcl and perl sections. Next,
substitute the correct things for the following
$(PYTHON) (possibly python)
$(SWORD_INCLUDES) (wherever sword includes are ie
$(LIB_SWORD) (ie -lsword)
$(top_srcdir) (bindings/swig)
$(SWIG) (Wherever the swig executable is e.g. swig -I/usr/local/share/swig)
$(VERSION) (1.5.9?)

then type "make python_make"
This should build the extension. I'm not sure whether you need to install it
(if you do, just type cd python && python setup.py install

If you would like any examples of how to use SWORD under python, just email

Hope this helps.

God Bless,

Of making many books there is no end, and much study is a weariness of the
Ecclesiastes 12:12 (ESV)

On 1/24/07, Pierre Amadio <pierre.amadio at libertysurf.fr> wrote:
> Hello.
> 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
> python.
> Thanks.
> Pierre Amadio
> _______________________________________________
> sword-devel mailing list: sword-devel at crosswire.org
> http://www.crosswire.org/mailman/listinfo/sword-devel
> Instructions to unsubscribe/change your settings at above page
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://www.crosswire.org/pipermail/sword-devel/attachments/20070125/6bd97eca/attachment.html 

More information about the sword-devel mailing list