Hello,

still in the early planning stage of a new Sablotron Python module, I
just managed to compile and test the old one (SabPyth 0.1 at
http://www.gingerall.com/perl/rd?url=sablot/Sab-pyth-0_1.tar.gz) with
Python 1.6, Sablotron 0.44 under Linux.  Here is what I did:


1. I changed the Sablotmodule.c to #include <sablot.h> instead of
#include "../include/sablot.h" and moved the directory containing the
module (called python in the distribution) out of the Sablotron source
directory.  The file sablot.h is somehow found in /usr/local/include
when compiling the module (if you compile on something other than linux,
you may have to put a "-I/usr/local/include" somewhere).


2. I edited the file Setup.in.  It now contains the two lines:

*shared*
Sablot Sablotmodule.c -lsablot -lxmlparse -lxmltok -liconv

You will not need the "-liconv" only if you have installed libiconv by
hand on an older (pre glibc) system that does not have it.


3. Copied a new Makefile.pre.in from the new Python version (the
included one is from python 1.5.2 - if you use 1.5.2 you won't need to
do this, but it cannot hurt):

cp /usr/local/lib/python1.6/config/Makefile.pre.in .


4. rm -f Makefile Setup ; make -f Makefile.pre.in boot (as told in the
documentation).


5. Set LD_LIBRARY_PATH to include the directory where libxmltok,
libxmlparse and libsablot are, in my case:

setenv LD_LIBRARY_PATH /usr/local/lib


6. Run the tests:

ln test/* .
python testsab.py


If anybody has ideas, suggestions, request whatever on what a Python
API for Sablotron should do, etc. please send them to me or to the list.

- Guenter
-- 
Guenter Radestock, Universitaetsbibliothek Karlsruhe
[EMAIL PROTECTED]
http://www.ubka.uni-karlsruhe.de/~guenter

Reply via email to