Re: plpython win32

From: "Magnus Hagander" <mha(at)sollentuna(dot)net>
To: "Joe Conway" <mail(at)joeconway(dot)com>
Cc: "Tom Lane" <tgl(at)sss(dot)pgh(dot)pa(dot)us>, "PostgreSQL-patches" <pgsql-patches(at)postgresql(dot)org>
Subject: Re: plpython win32
Date: 2004-09-26 15:03:55
Message-ID: 6BCB9D8A16AC4241919521715F4D8BCE475D56@algol.sollentuna.se
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-patches

>> The distutils module has a get_python_inc() function which
>returns the
>> include directory. If this one was used, we wouldn't have to
>hack up the
>> include path as I do now. Is there any reason this is not
>used on Unix,
>> instead of the hardcoded subdirectory-of-"python_prefix" way
>it is now?
>> (in _PGAC_CHECK_PYTHON_DIRS)
>
>Probably because until about 2 weeks ago, we didn't check for, or use,
>distutils at all ;-). Now we probably should.

Thanks. That explains a lot :-) Digging a bit further into it, now that
I knew that might be old code, I found that the parts that fail on win32
could be replaced with distutils code which does *not* fail on win32. So
no port-specific hack required at all.

So, here is a new patch. Summary:
* Get python_includespec from distutils instead of assuming directory
layout
* Get python_libspec from distutils instead of manually grep:ing in the
Makefile
* Export the python version into Makefile.global for access from
plpython/Makefile
* Change plpython/Makefile to generate an import library from the
installed python DLL. Now with comments on what and why. (This is the
only if win32 part left)

Hopefully this is better and more complete than the last attempt. I've
tested it on Linux with python 2.3.3 (slackware 9.1), and the new
autoconf stuff passes both there and on win32.

I know it's close to the wrap-time, but it'd be great if this could get
into beta3 (assuming it's Ok now).

//Magnus

Attachment Content-Type Size
plpython_win32.patch application/octet-stream 5.8 KB

Responses

Browse pgsql-patches by date

  From Date Subject
Next Message Andrew Dunstan 2004-09-26 19:00:00 Re: [HACKERS] cvsup
Previous Message Greg Stark 2004-09-26 06:51:53 Re: How to add locale support for each column?