[Pythonmac-SIG] Failing to import PyGreSQL module (Python 2.2.1 on 10.2.1)

Philippe Schmid phschmid@cadinfo.ch
Mon, 30 Sep 2002 22:14:56 +0200


I am trying to use the PyGreSQL python module ... without much success.

Compiling seems to be fine with

cc -shared -flat_namespace -undefined suppress -o _pg.so
-I/usr/include/python2.2
-I/Users/higgins/Documents/postgres/postgresql-7.2.2/src/include/
-I/usr/local/pgsql/include -L/usr/local/pgsql/lib -lpq pgmodule.c

but when trying to "import _pg" in Python (interpreter), I get this:

Traceback (most recent call last):
  File "<stdin>", line 1, in ?
ImportError: Failure linking new module


I also tried to compile with "standards" flags, as CFLAGS = -no-cpp-precomp
and LDFLAGS = -lgcc


If someone has another DB working module for Postgres, that would be also
fine (I also tried the PyPgSQL one, but compilation fails and I do not have
soo much time to debug this now).


Someone an Idea ? 
Many thanks for helping...

Philippe Schmid           <phschmid@cadinfo.ch>