aboutsummaryrefslogtreecommitdiff
path: root/ports/python3/portfile.cmake
diff options
context:
space:
mode:
authorAdam Johnson <AdamJohnso@gmail.com>2021-03-29 13:09:14 -0400
committerGitHub <noreply@github.com>2021-03-29 10:09:14 -0700
commitaaa6a031ced87d5b2c04023029bc5746dac52cb4 (patch)
tree871b1ee880668dc1de107308ca69c9d3003d5712 /ports/python3/portfile.cmake
parent76ab38bbd94001701d678643bf3a4d1cc43d7ca4 (diff)
downloadvcpkg-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/portfile.cmake')
-rw-r--r--ports/python3/portfile.cmake9
1 files changed, 9 insertions, 0 deletions
diff --git a/ports/python3/portfile.cmake b/ports/python3/portfile.cmake
index ee19476cf..3a90a7913 100644
--- a/ports/python3/portfile.cmake
+++ b/ports/python3/portfile.cmake
@@ -19,6 +19,15 @@ if(VCPKG_LIBRARY_LINKAGE STREQUAL "static")
list(PREPEND PATCHES 0001-static-library.patch)
endif()
+# Python 3.9 removed support for Windows 7. This patch re-adds support for Windows 7 and is therefore
+# required to build this port on Windows 7 itself due to Python using itself in its own build system.
+if("deprecated-win7-support" IN_LIST FEATURES)
+ list(APPEND PATCHES 0007-restore-support-for-windows-7.patch)
+ message(WARNING "Windows 7 support is deprecated and may be removed at any time.")
+elseif(VCPKG_TARGET_IS_WINDOWS AND CMAKE_SYSTEM_VERSION EQUAL 6.1)
+ message(FATAL_ERROR "python3 requires the feature deprecated-win7-support when building on Windows 7.")
+endif()
+
vcpkg_from_github(
OUT_SOURCE_PATH SOURCE_PATH
REPO python/cpython