mirror of
https://github.com/microsoft/vcpkg.git
synced 2024-12-13 19:59:00 +08:00
326eabc191
* [libpq] fix python patches * [libpq] Bump port-version and add comment about python patches * Bump port-version Co-authored-by: Robert Schumacher <roschuma@microsoft.com>
40 lines
1.7 KiB
Diff
40 lines
1.7 KiB
Diff
diff --git a/src/tools/msvc/Mkvcbuild.pm b/src/tools/msvc/Mkvcbuild.pm
|
|
index 99f39caa5..21b5559d6 100644
|
|
--- a/src/tools/msvc/Mkvcbuild.pm
|
|
+++ b/src/tools/msvc/Mkvcbuild.pm
|
|
@@ -494,14 +494,15 @@ sub mkvcbuild
|
|
|
|
# Attempt to get python version and location.
|
|
# Assume python.exe in specified dir.
|
|
- my $pythonprog = "import sys;print(sys.prefix);"
|
|
- . "print(str(sys.version_info[0])+str(sys.version_info[1]))";
|
|
- my $prefixcmd =
|
|
- $solution->{options}->{python} . "\\python -c \"$pythonprog\"";
|
|
- my $pyout = `$prefixcmd`;
|
|
- die "Could not query for python version!\n" if $?;
|
|
- my ($pyprefix, $pyver) = split(/\r?\n/, $pyout);
|
|
-
|
|
+ #my $pythonprog = "import sys;print(sys.prefix);"
|
|
+ # . "print(str(sys.version_info[0])+str(sys.version_info[1]))";
|
|
+ #my $prefixcmd =
|
|
+ # $solution->{options}->{python} . "\\python -c \"$pythonprog\"";
|
|
+ #my $pyout = `$prefixcmd`;
|
|
+ #die "Could not query for python version!\n" if $?;
|
|
+ #my ($pyprefix, $pyver) = split(/\r?\n/, $pyout);
|
|
+ my $pyprefix = $solution->{options}->{python};
|
|
+ my $pyver = 39;
|
|
# Sometimes (always?) if python is not present, the execution
|
|
# appears to work, but gives no data...
|
|
die "Failed to query python for version information\n"
|
|
@@ -510,8 +511,8 @@ sub mkvcbuild
|
|
my $pymajorver = substr($pyver, 0, 1);
|
|
my $plpython = $solution->AddProject('plpython' . $pymajorver,
|
|
'dll', 'PLs', 'src/pl/plpython');
|
|
- $plpython->AddIncludeDir($pyprefix . '/include');
|
|
- $plpython->AddLibrary($pyprefix . "/Libs/python$pyver.lib");
|
|
+ $plpython->AddIncludeDir($pyprefix . '/include/python3.9');
|
|
+ $plpython->AddLibrary($pyprefix . "/lib/python$pyver.lib");
|
|
$plpython->AddReference($postgres);
|
|
|
|
# Add transform modules dependent on plpython
|