python & postgresql ?
Tom Van den Brandt
guineapig at pi.be
Tue Aug 19 06:08:58 EDT 2003
Dave Kuhlman wrote:
> 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]
>
Tnx Dave
I had some dirs mixed-up... Tnx to your post I went back to have a look at
the setup.py file and found the problem
--
Tom Van den Brandt
I try...
More information about the Python-list
mailing list