python & postgresql ?
Dave Kuhlman
dkuhlman at rexx.com
Mon Aug 18 15:21:47 EDT 2003
GuineaPig wrote:
[snip]
> I've looked into pyPgSQL too, and this works fine under windows,
> but I cannot get this to run on my linux-machine (suse 8.2).
What problems are you having. I'm using pyPgSQL-2.3 on Debian
GNU/Linux and it seems to work fine, though I'll admit that my
usage does not stress it heavily.
I found that I had to make the following changes to setup.py:
======================================================
--- setup.py 2002-12-01 10:31:00.000000000 -0800
+++ setup_new.py 2003-06-11 16:13:40.000000000 -0700
@@ -80,7 +80,8 @@
def main():
# Set this to 1 if you need to use your own settings
- USE_CUSTOM = 0
+ USE_CUSTOM = 1
# Default settings, may be overriden for specific platforms
pypgsql_rt_dirs = None
@@ -96,8 +97,10 @@
"port/strtok.c"]
if USE_CUSTOM:
- include_dirs = YOUR_LIST_HERE
- library_dirs = YOUR_LIST_HERE
+ include_dirs = [ "/w2/Postgresql/postgresql-7.3.3/src/include",
+ "/w2/Postgresql/postgresql-7.3.3/src/interfaces/libpq/" ]
+ library_dirs = [ "/usr/local/pgsql/lib" ]
elif sys.platform == "linux2":
include_dirs = ["/usr/include", "/usr/include/postgresql",
"/usr/include/pgsql"]
@@ -164,6 +167,8 @@
name=modname,
sources = sources,
include_dirs = include_dirs,
+ define_macros = [('LONG_LONG', 'PY_LONG_LONG')],
library_dirs = library_dirs,
runtime_library_dirs = pypgsql_rt_dirs,
libraries = optional_libs
======================================================
Dave
[snip]
--
Dave Kuhlman
http://www.rexx.com/~dkuhlman
dkuhlman at rexx.com
More information about the Python-list
mailing list