2020-05-19 01:36:03 +08:00
|
|
|
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 =
|
2021-12-15 02:59:38 +08:00
|
|
|
- qq("$solution->{options}->{python}\\python" -c "$pythonprog");
|
2020-05-19 01:36:03 +08:00
|
|
|
- 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 =
|
2021-12-15 02:59:38 +08:00
|
|
|
+ # qq("$solution->{options}->{python}\\python" -c "$pythonprog");
|
2020-05-19 01:36:03 +08:00
|
|
|
+ #my $pyout = `$prefixcmd`;
|
|
|
|
+ #die "Could not query for python version!\n" if $?;
|
|
|
|
+ #my ($pyprefix, $pyver) = split(/\r?\n/, $pyout);
|
|
|
|
+ my $pyprefix = $solution->{options}->{python};
|
2022-03-24 07:41:00 +08:00
|
|
|
+ my $pyver = 310;
|
2020-05-19 01:36:03 +08:00
|
|
|
# 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"
|
2023-03-02 03:04:27 +08:00
|
|
|
@@ -510,11 +511,11 @@ sub mkvcbuild
|
|
|
|
die
|
|
|
|
"Python version $pyver is too old (version 3 or later is required)"
|
|
|
|
if int($pymajorver) < 3;
|
|
|
|
|
2020-05-19 01:36:03 +08:00
|
|
|
my $plpython = $solution->AddProject('plpython' . $pymajorver,
|
|
|
|
'dll', 'PLs', 'src/pl/plpython');
|
|
|
|
- $plpython->AddIncludeDir($pyprefix . '/include');
|
|
|
|
- $plpython->AddLibrary($pyprefix . "/Libs/python$pyver.lib");
|
2022-03-24 07:41:00 +08:00
|
|
|
+ $plpython->AddIncludeDir($pyprefix . '/include/python3.10');
|
2020-05-19 01:36:03 +08:00
|
|
|
+ $plpython->AddLibrary($pyprefix . "/lib/python$pyver.lib");
|
|
|
|
$plpython->AddReference($postgres);
|
|
|
|
|
|
|
|
# Add transform modules dependent on plpython
|