pg.ddx.io  pgsql-interfaces@postgresql.org mailing list archive  
help / color / mirror / Atom feed
pg.py under Mac OS X
3+ messages / 2 participants
[nested] [flat]

* pg.py under Mac OS X
@ 2005-04-11 00:15 mps@theintraweb.net
  2005-04-11 06:09 ` Re: pg.py under Mac OS X Tom Lane <tgl@sss.pgh.pa.us>
  0 siblings, 1 reply; 3+ messages in thread

From: mps@theintraweb.net @ 2005-04-11 00:15 UTC (permalink / raw)
  To: pgsql-interfaces; +Cc: mps@theintraweb.net

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



^ permalink  raw  reply  [nested|flat] 3+ messages in thread

* Re: pg.py under Mac OS X
  2005-04-11 00:15 pg.py under Mac OS X mps@theintraweb.net
@ 2005-04-11 06:09 ` Tom Lane <tgl@sss.pgh.pa.us>
  2005-04-11 22:34   ` Re: pg.py under Mac OS X mps@theintraweb.net
  0 siblings, 1 reply; 3+ messages in thread

From: Tom Lane @ 2005-04-11 06:09 UTC (permalink / raw)
  To: mps@theintraweb.net; +Cc: pgsql-interfaces

mps@theintraweb.net writes:
> 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/

You need to do "make install-all-headers" to get the server-side headers
installed in 7.4.  (IIRC we made this the default in 8.0, but it was not
default in any prior version.)

			regards, tom lane



^ permalink  raw  reply  [nested|flat] 3+ messages in thread

* Re: pg.py under Mac OS X
  2005-04-11 00:15 pg.py under Mac OS X mps@theintraweb.net
  2005-04-11 06:09 ` Re: pg.py under Mac OS X Tom Lane <tgl@sss.pgh.pa.us>
@ 2005-04-11 22:34   ` mps@theintraweb.net
  0 siblings, 0 replies; 3+ messages in thread

From: mps@theintraweb.net @ 2005-04-11 22:34 UTC (permalink / raw)
  To: Tom Lane <tgl@sss.pgh.pa.us>; +Cc: pgsql-interfaces

> mps@theintraweb.net writes:
>> 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/
>
> You need to do "make install-all-headers" to get the server-side headers
> installed in 7.4.  (IIRC we made this the default in 8.0, but it was not
> default in any prior version.)
>
> 			regards, tom lane

Thanks, I got PyGreSQL working by pointing setup.py to the postgres
source, but this is a much better way :)

thanks.

Matt Smith



^ permalink  raw  reply  [nested|flat] 3+ messages in thread


end of thread, other threads:[~2005-04-11 22:34 UTC | newest]

Thread overview: 3+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2005-04-11 00:15 pg.py under Mac OS X mps@theintraweb.net
2005-04-11 06:09 ` Tom Lane <tgl@sss.pgh.pa.us>
2005-04-11 22:34   ` mps@theintraweb.net

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox