diff options
| author | Adam Johnson <AdamJohnso@gmail.com> | 2021-03-29 13:09:14 -0400 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2021-03-29 10:09:14 -0700 |
| commit | aaa6a031ced87d5b2c04023029bc5746dac52cb4 (patch) | |
| tree | 871b1ee880668dc1de107308ca69c9d3003d5712 /ports/python3/0001-static-library.patch | |
| parent | 76ab38bbd94001701d678643bf3a4d1cc43d7ca4 (diff) | |
| download | vcpkg-aaa6a031ced87d5b2c04023029bc5746dac52cb4.tar.gz vcpkg-aaa6a031ced87d5b2c04023029bc5746dac52cb4.zip | |
[python3] Add feature deprecated-win7-support. (#16420)
* [python3] Move /MACHINE into MSBuild file.
This prevents potential patch application conflicts.
* [python3] Add feature deprecated-win7-support.
This backports the fix for bpo-39401 from the Python 3.8 branch instead
of the one from the Python 3.9 branch, which dropped support for Windows
7.
* [python3] Bump port version.
* [python3] Fix goof in static patch that omitted pathcch.lib.
* x-add-version
* [python3] Revert trivial patch changes
Co-authored-by: Robert Schumacher <roschuma@microsoft.com>
Diffstat (limited to 'ports/python3/0001-static-library.patch')
| -rw-r--r-- | ports/python3/0001-static-library.patch | 41 |
1 files changed, 13 insertions, 28 deletions
diff --git a/ports/python3/0001-static-library.patch b/ports/python3/0001-static-library.patch index f7d46d094..93a89a2e3 100644 --- a/ports/python3/0001-static-library.patch +++ b/ports/python3/0001-static-library.patch @@ -1,19 +1,19 @@ -From 4bd06273a9ed63f17966f113dc61a6051bad8b86 Mon Sep 17 00:00:00 2001 +From 14d91e4f4a9377f47cc4cc33faeeb7c82f64b176 Mon Sep 17 00:00:00 2001 From: Adam Johnson <AdamJohnso@gmail.com> Date: Thu, 28 May 2020 17:25:21 -0400 -Subject: [PATCH 1/6] static library +Subject: [PATCH 1/7] static library builds the pythoncore as a static library instead of a DLL --- - PC/pyconfig.h | 7 +++++++ - PCbuild/pythoncore.vcxproj | 16 ++++++++++++++-- - 2 files changed, 21 insertions(+), 2 deletions(-) + PC/pyconfig.h | 9 +++++++++ + PCbuild/pythoncore.vcxproj | 4 ++-- + 2 files changed, 11 insertions(+), 2 deletions(-) diff --git a/PC/pyconfig.h b/PC/pyconfig.h -index 02216b5068..7e0ba881a5 100644 +index d7d3cf081e..34269f0b75 100644 --- a/PC/pyconfig.h +++ b/PC/pyconfig.h -@@ -252,6 +252,7 @@ typedef int pid_t; +@@ -251,6 +251,7 @@ typedef int pid_t; /* For Windows the Python core is in a DLL by default. Test Py_NO_ENABLE_SHARED to find out. Also support MS_NO_COREDLL for b/w compat */ @@ -21,7 +21,7 @@ index 02216b5068..7e0ba881a5 100644 #if !defined(MS_NO_COREDLL) && !defined(Py_NO_ENABLE_SHARED) # define Py_ENABLE_SHARED 1 /* standard symbol for shared library */ # define MS_COREDLL /* deprecated old symbol */ -@@ -277,6 +278,12 @@ Py_NO_ENABLE_SHARED to find out. Also support MS_NO_COREDLL for b/w compat */ +@@ -276,6 +277,14 @@ Py_NO_ENABLE_SHARED to find out. Also support MS_NO_COREDLL for b/w compat */ # endif /* _DEBUG */ # endif /* _MSC_VER */ # endif /* Py_BUILD_CORE */ @@ -30,12 +30,14 @@ index 02216b5068..7e0ba881a5 100644 +# pragma comment(lib, "version.lib") +# pragma comment(lib, "shlwapi.lib") +# pragma comment(lib, "ws2_32.lib") -+# pragma comment(lib, "pathcch.lib") ++# if Py_WINVER > 0x0601 ++# pragma comment(lib, "pathcch.lib") ++# endif /* Py_WINVER */ #endif /* MS_COREDLL */ #if defined(MS_WIN64) diff --git a/PCbuild/pythoncore.vcxproj b/PCbuild/pythoncore.vcxproj -index 2625d0293d..dbe236829a 100644 +index 2625d0293d..2f8bdaa931 100644 --- a/PCbuild/pythoncore.vcxproj +++ b/PCbuild/pythoncore.vcxproj @@ -73,7 +73,7 @@ @@ -47,7 +49,7 @@ index 2625d0293d..dbe236829a 100644 <UseOfMfc>false</UseOfMfc> </PropertyGroup> <Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" /> -@@ -102,12 +102,24 @@ +@@ -102,7 +102,7 @@ <AdditionalOptions>/Zm200 %(AdditionalOptions)</AdditionalOptions> <AdditionalIncludeDirectories>$(PySourcePath)Python;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories> <AdditionalIncludeDirectories Condition="$(IncludeExternals)">$(zlibDir);%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories> @@ -56,23 +58,6 @@ index 2625d0293d..dbe236829a 100644 <PreprocessorDefinitions Condition="$(IncludeExternals)">_Py_HAVE_ZLIB;%(PreprocessorDefinitions)</PreprocessorDefinitions> </ClCompile> <Link> - <AdditionalDependencies>version.lib;shlwapi.lib;ws2_32.lib;pathcch.lib;%(AdditionalDependencies)</AdditionalDependencies> - </Link> -+ <Lib> -+ <TargetMachine Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">MachineX86</TargetMachine> -+ </Lib> -+ <Lib> -+ <TargetMachine Condition="'$(Configuration)|$(Platform)'=='PGInstrument|Win32'">MachineX86</TargetMachine> -+ </Lib> -+ <Lib> -+ <TargetMachine Condition="'$(Configuration)|$(Platform)'=='PGUpdate|Win32'">MachineX86</TargetMachine> -+ </Lib> -+ <Lib> -+ <TargetMachine Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">MachineX86</TargetMachine> -+ </Lib> - </ItemDefinitionGroup> - <ItemGroup> - <ClInclude Include="..\Include\Python-ast.h" /> -- 2.28.0.windows.1 |
