Thread: Python verison for build in config.pl (Win32)

Python verison for build in config.pl (Win32)

From
Matt
Date:
Attempting to build 8.5 alpha on Windows XP (MSVC 2005) with Python support. Path to local interpreter added to config.pl (C:\Python), but message is presented:

  "Could not determine python version from path at build.pl line 38"

Do the build scripts attempt to determine the Python version from the path name? Since my machine has a generic path name, is there a way to specify the interpreter version?

Re: Python verison for build in config.pl (Win32)

From
Tom Lane
Date:
Matt <bsg075@gmail.com> writes:
> Attempting to build 8.5 alpha on Windows XP (MSVC 2005) with Python support.
> Path to local interpreter added to config.pl (C:\Python), but message is
> presented:

>   "Could not determine python version from path at build.pl line 38"

> Do the build scripts attempt to determine the Python version from the path
> name? Since my machine has a generic path name, is there a way to specify
> the interpreter version?

Hm, I see this in Mkvcbuild.pm:

        $solution->{options}->{python} =~ /\\Python(\d{2})/i
          || croak "Could not determine python version from path";
        $plpython->AddLibrary($solution->{options}->{python} . "\\Libs\\python$1.lib");

Apparently you need to hack that to deduce the appropriate library
pathname.  What exactly is your python path name, and is it a standard
installation pattern at all?

            regards, tom lane

Re: [HACKERS] Python verison for build in config.pl (Win32)

From
Tom Lane
Date:
Magnus Hagander <magnus@hagander.net> writes:
> Or we'd welcome a patch for a smarter way to detect the version ;)

This particular code doesn't look like it really needs to know the
*version*.  What it wants is the full pathname of the python.lib file
that goes with the python executable.  Isn't there a way to ask Python
itself for that?

            regards, tom lane