pg.py under Mac OS X

From: mps(at)theintraweb(dot)net
To: pgsql-interfaces(at)postgresql(dot)org
Cc: mps(at)theintraweb(dot)net
Subject: pg.py under Mac OS X
Date: 2005-04-11 00:15:10
Message-ID: 49363.202.12.92.169.1113178510.squirrel@202.12.92.169
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-interfaces

Hello Interfaces List,

I am trying to get python access to postgresql-7.4.7 under Mac OS X
10.3.8. When I compiled postgresql from the source I used --with-python,
but got the following error:

*** Cannot build PL/Python because libpython is not a shared library.
*** You might have to rebuild your Python installation. Refer to
*** the documentation for details.

I figured I'd simply install PyGreSQL instead. I installed postgresql and
got it going then I dropped down the PyGreSQL-3.6.1 archive, untar'ed it
and ran:

python setup.py build

but got the following error:

gcc -fno-strict-aliasing -Wno-long-double -no-cpp-precomp -mno-fused-madd
-fno-common -dynamic -DNDEBUG -g -O3 -Wall -Wstrict-prototypes
-I/usr/local/pgsql/include -I/usr/local/pgsql/include/server
-I/System/Library/Frameworks/Python.framework/Versions/2.3/include/python2.3
-c pgmodule.c -o build/temp.darwin-7.8.0-Power_Macintosh-2.3/pgmodule.o
pgmodule.c:31:22: postgres.h: No such file or directory
pgmodule.c:34:29: catalog/pg_type.h: No such file or directory
pgmodule.c: In function `get_type_array':
pgmodule.c:300: error: `INT2OID' undeclared (first use in this function)
pgmodule.c:300: error: (Each undeclared identifier is reported only once
pgmodule.c:300: error: for each function it appears in.)
pgmodule.c:301: error: `INT4OID' undeclared (first use in this function)
pgmodule.c:305: error: `INT8OID' undeclared (first use in this function)
pgmodule.c:306: error: `OIDOID' undeclared (first use in this function)
pgmodule.c:310: error: `FLOAT4OID' undeclared (first use in this function)
pgmodule.c:311: error: `FLOAT8OID' undeclared (first use in this function)
pgmodule.c:312: error: `NUMERICOID' undeclared (first use in this function)
pgmodule.c:316: error: `CASHOID' undeclared (first use in this function)
error: command 'gcc' failed with exit status 1

After a quick search on my system, I find that postgres.h only exists in
the postgresql-7.4.7 source directory, and was not installed with the
headers in /usr/local/pgsql/include/

Is this correct? Should I be approaching this a different way? I am unsure
of how to continue to get this going.

Any help would be great,

Cheers

Matt Smith

Responses

Browse pgsql-interfaces by date

  From Date Subject
Next Message Tom Lane 2005-04-11 06:09:53 Re: pg.py under Mac OS X
Previous Message Bruce Momjian 2005-04-10 04:28:24 Re: Problems with PQfmod() returning -1 on varchar f