![]() | |
![]() |
| | Thread Tools | Display Modes |
#1
| |||
| |||
|
|
This patch attempts to fix the build of plpython on win32. |
#2
| |||
| |||
|
|
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. |
#3
| |||
| |||
|
|
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.... |
#4
| |||
| |||
|
|
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. |
#5
| |||
| |||
|
|
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". |
#6
| |||
| |||
|
|
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 }" |
#7
| |||
| |||
|
|
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 ]) |
#8
| |||
| |||
|
|
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. |
#9
| |||
| |||
|
|
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? |
#10
| |||
| |||
|
|
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) |
![]() |
| Thread Tools | |
| Display Modes | |
| |