module informixdb for Python-2.2.2

Martin Erren martin.erren at brainforce.at
Tue Dec 3 06:04:31 EST 2002


"Steve Holden":
> "Martin Erren" <martin.erren at brainforce.at>:
> > Hello!
> >
> > The newest informixdb module seems to be:
> >
> > http://starship.python.net/crew/sturner/informixdb.html
> >
> > but is for Python-1.5
> >
> > Now I upgraded to Python2.2.2 and
> > simply copying the old moduls causes the error:
> >
> > $PYTHONHOME/Lib/informixdb.py:39: RuntimeWarning: Python C API version
> > mismatch for module _informixdb:
> > This Python has API version 1011, module _informixdb has version 1007.
> >   import _informixdb
> > $PYTHONHOME/Lib/informixdb.py:39: RuntimeWarning: Python C AP
> > I version mismatch for module dbi: This Python has API version 1011,
> > module dbi has version 1007.
> >   import _informixdb
> > Illegal instruction (core dumped)
> >
> > is this the "Python Database API Specification 1.0" or the Python API
> > in
> > general?
> >
> This is the Python API. There is no guarantee of compatibility between
> versions, and an extension module compiled against 1.5.2 will not work with
> 2.0 or higher. Even the bytecodes change between versions, as thinking on
> the best "Python virtual machine" changes.
> 
> You should also be aware that the current DB API specification is 2.0, so
> this module is clearly antiquated.
> 
> > I tried to recompile after using esql, but i didn't managed it, to
> > link a _informixdb.so due to much unknown dependencies, e.g.
> > ".sqli_connect_open",
> > loading each informix-module in /usr/informix/lib.
> >
> > Hope for help and thanks in advance:
> 
> Unfortunately it looks like you don't have the right Informix development
> kit. Neither do I :-(

The Makefile didn't work, but cofigure gave me some information to
ext/Setup. I pasted it to my script:

esql -e _informixdb.ec
cc_r _informixdb.c dbi.c -DSTEP1 -DEXTENDED_ERROR_HANDLING \
-IInclude -I/usr/informix/incl/esql/
rm build/lib.aix-4.3-2.2/_informixdb.so
./Modules/ld_so_aix cc_r -bI:Modules/python.exp \
_informixdb.o dbi.o \
-L/usr/informix/lib \
-L/usr/informix/lib/esql -lifsql -lifasf -lifgen -lifos -lifgls -lifglx \
/usr/informix/lib/esql/checkapi.o -L/usr/local/lib -ldl -lm -lxnet \
-L/usr/local/lib -o build/lib.aix-4.3-2.2/_informixdb.so

And that worked! (after I made some minor changes
#import "Python.p" to #import <Python.h> and config.h redirected
to pyconfig.h)

> Have you tried mailing the module author? If so, with no luck, perhaps you
> could try the DB-SIG mailing list - the detail are at

He get a copy of this. His email is in the README

> Sorry not to have anything more positive to report.

Many thanks to all:
Martin Erren



More information about the Python-list mailing list