Re: [PATCHES] plpython win32
Patch applied. Thanks. --- Magnus Hagander wrote: So, here is a new patch. Summary: There is still a hard-coded python version in libpython23.a. Argh. I thought I caught them all. How the heck did I miss such an obvious one. Of cuorse, it's supposed to be libpython${pytverstr}.a... Same for the .def file on the next line. Here is an updated patch that fixes this. Apart from that, same as before. //Magnus Content-Description: plpython_win32.patch [ Attachment, skipping... ] ---(end of broadcast)--- TIP 3: if posting/reading through Usenet, please send an appropriate subscribe-nomail command to [EMAIL PROTECTED] so that your message can get through to the mailing list cleanly -- Bruce Momjian| http://candle.pha.pa.us [EMAIL PROTECTED] | (610) 359-1001 + If your life is a hard drive, | 13 Roberts Road + Christ can be your backup.| Newtown Square, Pennsylvania 19073 ---(end of broadcast)--- TIP 8: explain analyze is your friend
Re: [PATCHES] plpython win32
So, here is a new patch. Summary: There is still a hard-coded python version in libpython23.a. Argh. I thought I caught them all. How the heck did I miss such an obvious one. Of cuorse, it's supposed to be libpython${pytverstr}.a... Same for the .def file on the next line. Here is an updated patch that fixes this. Apart from that, same as before. //Magnus plpython_win32.patch Description: plpython_win32.patch ---(end of broadcast)--- TIP 3: if posting/reading through Usenet, please send an appropriate subscribe-nomail command to [EMAIL PROTECTED] so that your message can get through to the mailing list cleanly
Re: [PATCHES] plpython win32
Magnus Hagander wrote: 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. Joe ---(end of broadcast)--- TIP 6: Have you searched our list archives? http://archives.postgresql.org
Re: [PATCHES] plpython win32
Magnus Hagander [EMAIL PROTECTED] writes: This patch attempts to fix the build of plpython on win32. How is python_includespec going to get set if we don't run the autoconf test that finds it out? I'm quite unthrilled with hardwiring the python version number, as well. regards, tom lane ---(end of broadcast)--- TIP 9: the planner will ignore your desire to choose an index scan if your joining column's datatypes do not match
Re: [PATCHES] plpython win32
This patch attempts to fix the build of plpython on win32. How is python_includespec going to get set if we don't run the autoconf test that finds it out? I'm quite unthrilled with hardwiring the python version number, as well. We run the first part of the autoconf test. The one that sets python_includespec. (PGAC_PATH_PYTHON) We just skip the parts that tries to read the Makefile. If there is a good way, that subst command could/should be changed to just strip the last part of the directory. PGAC_PATH_PYTHON appends te python version, which is not correct on win32. //Magnus ---(end of broadcast)--- TIP 4: Don't 'kill -9' the postmaster
Re: [PATCHES] plpython win32
Magnus Hagander wrote: This patch attempts to fix the build of plpython on win32. Needs autoconf of course - don't have mine working on win32, so that part hasn't been 100% tested. My tests involved #:ing out all the code that would be included by that rule, and that makes it work, so I think we're safe Please do not use PORTNAME in external macros. I like to think that one can take these macros and put them in some other project without requiring the prior setup that the PostgreSQL configure.in does. Instead, use AC_REQUIRE([AC_CANONICAL_HOST]) and resolve the issue using $host_os. Also, add some comments to the magic you add in the makefiles. The hardcoded Python version number will of course not stand the test of time. -- Peter Eisentraut http://developer.postgresql.org/~petere/ ---(end of broadcast)--- TIP 9: the planner will ignore your desire to choose an index scan if your joining column's datatypes do not match
Re: [PATCHES] plpython win32
If there is a good way, that subst command could/should be changed to just strip the last part of the directory. PGAC_PATH_PYTHON appends te python version, which is not correct on win32. I'm curious to know how the code AC_PATH_PROG(PYTHON, python) appends the python version. No. Not that one. PGAC_PATH_PYTHON. That is a different line. It's defined in config/python.m4. The line is: python_includespec=-I${python_prefix}/include/python${python_version} //Magnus ---(end of broadcast)--- TIP 6: Have you searched our list archives? http://archives.postgresql.org
Re: [PATCHES] plpython win32
Magnus Hagander wrote: No. Not that one. PGAC_PATH_PYTHON. That is a different line. It's defined in config/python.m4. The line is: python_includespec=-I${python_prefix}/include/python${python_version } Are we reading the same code? # PGAC_PATH_PYTHON # # Look for Python and set the output variable 'PYTHON' # to 'python' if found, empty otherwise. AC_DEFUN([PGAC_PATH_PYTHON], [AC_PATH_PROG(PYTHON, python) if test x$PYTHON = x; then AC_MSG_ERROR([Python not found]) fi ]) -- Peter Eisentraut http://developer.postgresql.org/~petere/ ---(end of broadcast)--- TIP 1: subscribe and unsubscribe commands go to [EMAIL PROTECTED]
Re: [PATCHES] plpython win32
No. Not that one. PGAC_PATH_PYTHON. That is a different line. It's defined in config/python.m4. The line is: python_includespec=-I${python_prefix}/include/python${python_version } Are we reading the same code? # PGAC_PATH_PYTHON # # Look for Python and set the output variable 'PYTHON' # to 'python' if found, empty otherwise. AC_DEFUN([PGAC_PATH_PYTHON], [AC_PATH_PROG(PYTHON, python) if test x$PYTHON = x; then AC_MSG_ERROR([Python not found]) fi ]) Not quite. Further down in that same file. Seems I mean PGAC_CHECK_PYTHON_DIRS :-) Not used to these files... I guess that means that I'm off on the wrong path. :-( Anyway. The issue is that there is no Makefile in $python_configdir. That's the part that we need to get rid of. Any pointers? Some kind of if in python.m4 then probably? //Magnus ---(end of broadcast)--- TIP 1: subscribe and unsubscribe commands go to [EMAIL PROTECTED]
Re: [PATCHES] plpython win32
Magnus Hagander [EMAIL PROTECTED] writes: We run the first part of the autoconf test. The one that sets python_includespec. (PGAC_PATH_PYTHON) We just skip the parts that tries to read the Makefile. It would be better to put an if in the PGAC_CHECK_PYTHON_EMBED_SETUP macro, and have it use some other technique for obtaining the info it needs when on Windows. If they don't have a Makefile, one would hope they have some other kind of file that has the needed info. Or doesn't Python support embedding on Windows? regards, tom lane ---(end of broadcast)--- TIP 1: subscribe and unsubscribe commands go to [EMAIL PROTECTED]