mirror of https://github.com/microsoft/vcpkg.git
[python3] Bump to 3.10.7 (#27558)
* [python3] Make patch files contiguous. When applying these back to the python3 repository and re-formatting, the gap in patch file numbers requires annoying manual renaming. Debunk that. * [python3] Use patch files, not diffs. Diffs require multiple steps to import into the python3 repository. Debunk that. The patch format retains authorship information. * [python3] Fix problems with conflicting patches. Something modified in the static library patch was being used as a context line in a later patch. How did this pass CI? * [python3] Bump to 3.10.7. * [python3] Fix Windows 7 patch. * [python3] Back out trivial patch changes. * [python3] Apply unconditional patches first. * version things and stuff * Bump Python tools to 3.10.7.
This commit is contained in:
parent
23753227c9
commit
5599ae4ccf
|
|
@ -27,6 +27,8 @@ index 4d416c589e..ede9868a8f 100644
|
|||
--- a/PCbuild/pcbuild.proj
|
||||
+++ b/PCbuild/pcbuild.proj
|
||||
@@ -49,17 +49,17 @@
|
||||
<!-- python3.dll -->
|
||||
<Projects Include="python3dll.vcxproj" />
|
||||
<!-- py[w].exe -->
|
||||
- <Projects Include="pylauncher.vcxproj;pywlauncher.vcxproj" />
|
||||
+ <Projects Include="pylauncher.vcxproj;pywlauncher.vcxproj" Condition="false" />
|
||||
|
|
@ -36,6 +36,19 @@ index d7d3cf081e..34269f0b75 100644
|
|||
#endif /* MS_COREDLL */
|
||||
|
||||
#if defined(MS_WIN64)
|
||||
diff --git a/PCbuild/pcbuild.proj b/PCbuild/pcbuild.proj
|
||||
index 70c336a9d3..ba797e8afd 100644
|
||||
--- a/PCbuild/pcbuild.proj
|
||||
+++ b/PCbuild/pcbuild.proj
|
||||
@@ -45,7 +45,7 @@
|
||||
<BuildInParallel>false</BuildInParallel>
|
||||
</Projects>
|
||||
<!-- python3.dll -->
|
||||
- <Projects Include="python3dll.vcxproj" />
|
||||
+ <Projects Include="python3dll.vcxproj" Condition="false" />
|
||||
<!-- py[w].exe -->
|
||||
<Projects Include="pylauncher.vcxproj;pywlauncher.vcxproj" Condition="false" />
|
||||
<!-- pyshellext.dll -->
|
||||
diff --git a/PCbuild/pythoncore.vcxproj b/PCbuild/pythoncore.vcxproj
|
||||
index 2625d0293d..2f8bdaa931 100644
|
||||
--- a/PCbuild/pythoncore.vcxproj
|
||||
|
|
@ -62,7 +75,7 @@ diff --git a/Python/sysmodule.c b/Python/sysmodule.c
|
|||
index ac49f7867a..f3583345ff 100644
|
||||
--- a/Python/sysmodule.c
|
||||
+++ b/Python/sysmodule.c
|
||||
@@ -2804,6 +2804,9 @@ _PySys_InitCore(PyThreadState *tstate, PyObject *sysdict)
|
||||
@@ -2804,6 +2804,9 @@ _PySys_InitCore(PyThreadState *tstate, PyObject *sysdict
|
||||
#ifdef MS_COREDLL
|
||||
SET_SYS("dllhandle", PyLong_FromVoidPtr(PyWin_DLLhModule));
|
||||
SET_SYS_FROM_STRING("winver", PyWin_DLLVersionString);
|
||||
|
|
@ -72,19 +85,6 @@ index ac49f7867a..f3583345ff 100644
|
|||
#endif
|
||||
#ifdef ABIFLAGS
|
||||
SET_SYS_FROM_STRING("abiflags", ABIFLAGS);
|
||||
diff --git a/PCbuild/pcbuild.proj b/PCbuild/pcbuild.proj
|
||||
index 70c336a9d3..ba797e8afd 100644
|
||||
--- a/PCbuild/pcbuild.proj
|
||||
+++ b/PCbuild/pcbuild.proj
|
||||
@@ -45,7 +45,7 @@
|
||||
<BuildInParallel>false</BuildInParallel>
|
||||
</Projects>
|
||||
<!-- python3.dll -->
|
||||
- <Projects Include="python3dll.vcxproj" />
|
||||
+ <Projects Include="python3dll.vcxproj" Condition="false" />
|
||||
<!-- py[w].exe -->
|
||||
<Projects Include="pylauncher.vcxproj;pywlauncher.vcxproj" />
|
||||
<!-- pyshellext.dll -->
|
||||
--
|
||||
2.28.0.windows.1
|
||||
|
||||
|
|
@ -26,7 +26,7 @@ index dbe236829a..5f30a35eb3 100644
|
|||
<ClCompile Include="$(zlibDir)\compress.c" />
|
||||
<ClCompile Include="$(zlibDir)\crc32.c" />
|
||||
@@ -556,7 +558,7 @@
|
||||
<Target Name="_WarnAboutToolset" BeforeTargets="PrepareForBuild" Condition="$(PlatformToolset) != 'v140' and $(PlatformToolset) != 'v141' and $(PlatformToolset) != 'v142'">
|
||||
<Target Name="_WarnAboutToolset" BeforeTargets="PrepareForBuild" Condition="$(PlatformToolset) != 'v140' and $(PlatformToolset) != 'v141' and $(PlatformToolset) != 'v142' and $(PlatformToolset) != 'v143'">
|
||||
<Warning Text="Toolset $(PlatformToolset) is not used for official builds. Your build may have errors or incompatibilities." />
|
||||
</Target>
|
||||
- <Target Name="_WarnAboutZlib" BeforeTargets="PrepareForBuild" Condition="!$(IncludeExternals)">
|
||||
|
|
@ -10,6 +10,24 @@ pathcch.
|
|||
The same mechanism is applied to fix posixmodule.c
|
||||
---
|
||||
index 25ddc82..ff51042 100644
|
||||
--- a/Modules/_winapi.c
|
||||
+++ b/Modules/_winapi.c
|
||||
@@ -44,6 +44,15 @@
|
||||
#include <crtdbg.h>
|
||||
#include "winreparse.h"
|
||||
|
||||
+// The Windws 7 patch lowers the API version such that these constants
|
||||
+// are no longer defined by the Windows SDK. Debounce that.
|
||||
+#ifndef LCMAP_SORTHANDLE
|
||||
+# define LCMAP_SORTHANDLE 0x20000000
|
||||
+#endif
|
||||
+#ifndef LCMAP_HASH
|
||||
+# define LCMAP_HASH 0x00040000
|
||||
+#endif
|
||||
+
|
||||
#if defined(MS_WIN32) && !defined(MS_WIN64)
|
||||
#define HANDLE_TO_PYNUM(handle) \
|
||||
PyLong_FromUnsignedLong((unsigned long) handle)
|
||||
diff --git a/Modules/posixmodule.c b/Modules/posixmodule.c
|
||||
--- a/Modules/posixmodule.c
|
||||
+++ b/Modules/posixmodule.c
|
||||
|
|
|
|||
|
|
@ -0,0 +1,34 @@
|
|||
From 3c43def510e7c4c115fbe3938db8e4fe9bc2e311 Mon Sep 17 00:00:00 2001
|
||||
From: Max Khon <fjoe@samodelkin.net>
|
||||
Date: Tue, 8 Feb 2022 12:58:30 +0700
|
||||
Subject: [PATCH 08/11] python.pc
|
||||
|
||||
Fix pkgconfig for debug Linux builds (#22529)
|
||||
---
|
||||
Misc/python-embed.pc.in | 2 +-
|
||||
Misc/python.pc.in | 2 +-
|
||||
2 files changed, 2 insertions(+), 2 deletions(-)
|
||||
|
||||
diff --git a/Misc/python-embed.pc.in b/Misc/python-embed.pc.in
|
||||
index 2be9df8143..92142dfe68 100644
|
||||
--- a/Misc/python-embed.pc.in
|
||||
+++ b/Misc/python-embed.pc.in
|
||||
@@ -10,4 +10,4 @@ Requires:
|
||||
Version: @VERSION@
|
||||
Libs.private: @LIBS@
|
||||
Libs: -L${libdir} -lpython@VERSION@@ABIFLAGS@
|
||||
-Cflags: -I${includedir}/python@VERSION@@ABIFLAGS@
|
||||
+Cflags: -I${includedir}/python@VERSION@
|
||||
diff --git a/Misc/python.pc.in b/Misc/python.pc.in
|
||||
index 87e04decc2..0349dc81ba 100644
|
||||
--- a/Misc/python.pc.in
|
||||
+++ b/Misc/python.pc.in
|
||||
@@ -10,4 +10,4 @@ Requires:
|
||||
Version: @VERSION@
|
||||
Libs.private: @LIBS@
|
||||
Libs:
|
||||
-Cflags: -I${includedir}/python@VERSION@@ABIFLAGS@
|
||||
+Cflags: -I${includedir}/python@VERSION@
|
||||
--
|
||||
2.37.3.windows.1
|
||||
|
||||
|
|
@ -1,3 +1,13 @@
|
|||
From a45e64a57c58a9fe4984b866e86c7b661da7940d Mon Sep 17 00:00:00 2001
|
||||
From: Alexander Neumann <30894796+Neumann-A@users.noreply.github.com>
|
||||
Date: Mon, 14 Mar 2022 09:09:48 +0100
|
||||
Subject: [PATCH 09/11] bz2d
|
||||
|
||||
fix bz2(d) search on linux (#23525)
|
||||
---
|
||||
setup.py | 8 ++++++++
|
||||
1 file changed, 8 insertions(+)
|
||||
|
||||
diff --git a/setup.py b/setup.py
|
||||
index 43e807f20..df4d43d3d 100644
|
||||
--- a/setup.py
|
||||
|
|
@ -17,3 +27,6 @@ index 43e807f20..df4d43d3d 100644
|
|||
else:
|
||||
self.missing.append('_bz2')
|
||||
|
||||
--
|
||||
2.37.3.windows.1
|
||||
|
||||
|
|
@ -1,16 +0,0 @@
|
|||
--- a/Misc/python.pc.in 2022-01-14 05:23:10.299912709 +0000
|
||||
+++ b/Misc/python.pc.in 2022-01-14 05:23:15.908022446 +0000
|
||||
@@ -10,4 +10,4 @@
|
||||
Version: @VERSION@
|
||||
Libs.private: @LIBS@
|
||||
Libs:
|
||||
-Cflags: -I${includedir}/python@VERSION@@ABIFLAGS@
|
||||
+Cflags: -I${includedir}/python@VERSION@
|
||||
--- a/Misc/python-embed.pc.in 2022-01-14 05:22:57.043653570 +0000
|
||||
+++ b/Misc/python-embed.pc.in 2022-01-14 05:23:04.603801315 +0000
|
||||
@@ -10,4 +10,4 @@
|
||||
Version: @VERSION@
|
||||
Libs.private: @LIBS@
|
||||
Libs: -L${libdir} -lpython@VERSION@@ABIFLAGS@
|
||||
-Cflags: -I${includedir}/python@VERSION@@ABIFLAGS@
|
||||
+Cflags: -I${includedir}/python@VERSION@
|
||||
|
|
@ -1,3 +1,12 @@
|
|||
From f7439eae9b2f8d91b6689efbf01292a044f3a3fe Mon Sep 17 00:00:00 2001
|
||||
From: Osyotr <Osyotr@users.noreply.github.com>
|
||||
Date: Thu, 4 Aug 2022 23:49:06 +0300
|
||||
Subject: [PATCH 10/11] dont skip rpath
|
||||
|
||||
---
|
||||
setup.py | 21 +++++++++++++++++++--
|
||||
1 file changed, 19 insertions(+), 2 deletions(-)
|
||||
|
||||
diff --git a/setup.py b/setup.py
|
||||
index 61b3266..4c2cfb4 100644
|
||||
--- a/setup.py
|
||||
|
|
@ -156,3 +165,6 @@ index 61b3266..4c2cfb4 100644
|
|||
include_dirs=includes_dirs))
|
||||
|
||||
|
||||
--
|
||||
2.37.3.windows.1
|
||||
|
||||
|
|
@ -1,3 +1,12 @@
|
|||
From 84652c4c5658fd443a05bf54fe6040857ba9c36c Mon Sep 17 00:00:00 2001
|
||||
From: Christoph Neuhauser <c.a.neuhauser@gmail.com>
|
||||
Date: Sat, 15 Oct 2022 01:14:12 +0200
|
||||
Subject: [PATCH 11/11] gcc ldflags fix
|
||||
|
||||
---
|
||||
Lib/distutils/unixccompiler.py | 24 ++++++++++++++++++++++--
|
||||
1 file changed, 22 insertions(+), 2 deletions(-)
|
||||
|
||||
diff --git a/Lib/distutils/unixccompiler.py b/Lib/distutils/unixccompiler.py
|
||||
index d00c48981e..b14ce8454e 100644
|
||||
--- a/Lib/distutils/unixccompiler.py
|
||||
|
|
@ -40,3 +49,6 @@ index d00c48981e..b14ce8454e 100644
|
|||
|
||||
def runtime_library_dir_option(self, dir):
|
||||
# XXX Hackish, at the very least. See Python bug #445902:
|
||||
--
|
||||
2.37.3.windows.1
|
||||
|
||||
|
|
@ -5,24 +5,26 @@ endif()
|
|||
|
||||
set(PYTHON_VERSION_MAJOR 3)
|
||||
set(PYTHON_VERSION_MINOR 10)
|
||||
set(PYTHON_VERSION_PATCH 5)
|
||||
set(PYTHON_VERSION_PATCH 7)
|
||||
set(PYTHON_VERSION ${PYTHON_VERSION_MAJOR}.${PYTHON_VERSION_MINOR}.${PYTHON_VERSION_PATCH})
|
||||
|
||||
set(PATCHES
|
||||
0002-use-vcpkg-zlib.patch
|
||||
0003-devendor-external-dependencies.patch
|
||||
0004-dont-copy-vcruntime.patch
|
||||
0005-only-build-required-projects.patch
|
||||
0009-python.pc.patch
|
||||
0010-bz2d.patch
|
||||
0011-dont-skip-rpath.patch
|
||||
0001-only-build-required-projects.patch
|
||||
0003-use-vcpkg-zlib.patch
|
||||
0004-devendor-external-dependencies.patch
|
||||
0005-dont-copy-vcruntime.patch
|
||||
0008-python.pc.patch
|
||||
0009-bz2d.patch
|
||||
0010-dont-skip-rpath.patch
|
||||
)
|
||||
|
||||
if(VCPKG_LIBRARY_LINKAGE STREQUAL "static")
|
||||
list(PREPEND PATCHES 0001-static-library.patch)
|
||||
list(APPEND PATCHES 0002-static-library.patch)
|
||||
endif()
|
||||
|
||||
# Fix build failures with GCC for built-in modules (https://github.com/microsoft/vcpkg/issues/26573)
|
||||
if(VCPKG_CMAKE_SYSTEM_NAME STREQUAL "Linux")
|
||||
list(APPEND PATCHES 0012-gcc-ldflags-fix.patch)
|
||||
list(APPEND PATCHES 0011-gcc-ldflags-fix.patch)
|
||||
endif()
|
||||
|
||||
# Python 3.9 removed support for Windows 7. This patch re-adds support for Windows 7 and is therefore
|
||||
|
|
@ -47,7 +49,7 @@ vcpkg_from_github(
|
|||
OUT_SOURCE_PATH SOURCE_PATH
|
||||
REPO python/cpython
|
||||
REF v${PYTHON_VERSION}
|
||||
SHA512 7a736c6bf76735f66eba50bc055661c46fefce1496869c51e9b6b264bca456d2f2c6de293dfc3bc15a9d1df4b633d7f6f66ed86696e71a36e500354a75f4200f
|
||||
SHA512 88bf6efef632a7dad7306a59b7d5da159947d6675f0d264f1f33aa49a5703b4e4595011de52098eb839cc648994ae143f668507be7209f6bf3fe8ae0ec6a9125
|
||||
HEAD_REF master
|
||||
PATCHES ${PATCHES}
|
||||
)
|
||||
|
|
|
|||
|
|
@ -1,7 +1,6 @@
|
|||
{
|
||||
"name": "python3",
|
||||
"version": "3.10.5",
|
||||
"port-version": 4,
|
||||
"version": "3.10.7",
|
||||
"description": "The Python programming language",
|
||||
"homepage": "https://github.com/python/cpython",
|
||||
"license": "Python-2.0",
|
||||
|
|
|
|||
|
|
@ -224,17 +224,17 @@ function(vcpkg_find_acquire_program program)
|
|||
elseif(program STREQUAL "PYTHON3")
|
||||
if(CMAKE_HOST_WIN32)
|
||||
set(program_name python)
|
||||
set(program_version 3.10.5)
|
||||
set(program_version 3.10.7)
|
||||
if(VCPKG_TARGET_ARCHITECTURE STREQUAL "x86")
|
||||
set(tool_subdirectory "python-${program_version}-x86")
|
||||
set(download_urls "https://www.python.org/ftp/python/${program_version}/python-${program_version}-embed-win32.zip")
|
||||
set(download_filename "python-${program_version}-embed-win32.zip")
|
||||
set(download_sha512 7598cf838401d87c4aadb43f1d70a66c647b5c4c86d55eed747126eb21e699ee8e662eef50782eabe10c746ae3947a7f1418fa9e2c1131ca8f3ed06dcb48b00f)
|
||||
set(download_sha512 a69445906a909ce5f2554c544fe4251a8ab9c5028b531975b8c78fa8e98295b2bf06e1840f346a3c0edf485a7792c40c9d318bffd36b9c7829ac72b7cf8697bc)
|
||||
else()
|
||||
set(tool_subdirectory "python-${program_version}-x64")
|
||||
set(download_urls "https://www.python.org/ftp/python/${program_version}/python-${program_version}-embed-amd64.zip")
|
||||
set(download_filename "python-${program_version}-embed-amd64.zip")
|
||||
set(download_sha512 17b1e00af8a051a4d319dd4bf340a6ad742c1b691faa30ea9f51bc0f2e9daccccd2745e2a081699428981d120d0c06007878ecaafca78936f4cfcab0054b4fb7)
|
||||
set(download_sha512 29b47f8073b54c092a2c8b39b09ab392f757a8c09149e8d2de043907fffb250b5f6801175e16fedb4fae7b6555822acdc57d81d13c2fea95ef0f6ed717f86cb9)
|
||||
endif()
|
||||
set(paths_to_search "${DOWNLOADS}/tools/python/${tool_subdirectory}")
|
||||
vcpkg_list(SET post_install_command "${CMAKE_COMMAND}" -E rm python310._pth)
|
||||
|
|
|
|||
|
|
@ -1,18 +1,18 @@
|
|||
<?xml version="1.0"?>
|
||||
<tools version="2">
|
||||
<tool name="python3" os="windows">
|
||||
<version>3.10.5</version>
|
||||
<version>3.10.7</version>
|
||||
<exeRelativePath>python.exe</exeRelativePath>
|
||||
<url>https://www.python.org/ftp/python/3.10.5/python-3.10.5-embed-win32.zip</url>
|
||||
<sha512>7598cf838401d87c4aadb43f1d70a66c647b5c4c86d55eed747126eb21e699ee8e662eef50782eabe10c746ae3947a7f1418fa9e2c1131ca8f3ed06dcb48b00f</sha512>
|
||||
<archiveName>python-3.10.5-embed-win32.zip</archiveName>
|
||||
<url>https://www.python.org/ftp/python/3.10.7/python-3.10.7-embed-win32.zip</url>
|
||||
<sha512>a69445906a909ce5f2554c544fe4251a8ab9c5028b531975b8c78fa8e98295b2bf06e1840f346a3c0edf485a7792c40c9d318bffd36b9c7829ac72b7cf8697bc</sha512>
|
||||
<archiveName>python-3.10.7-embed-win32.zip</archiveName>
|
||||
</tool>
|
||||
<tool name="python3_with_venv" os="windows">
|
||||
<version>3.10.5</version>
|
||||
<version>3.10.7</version>
|
||||
<exeRelativePath>tools\python.exe</exeRelativePath>
|
||||
<url>https://www.nuget.org/api/v2/package/python/3.10.5</url>
|
||||
<sha512>be225985a23b685939ff6cb134fbe29b8fd6683cd6695753fc10ef4784dcc412fc98aa2dedca902cf0be5393dfd97724ea88331cda1bcd4b86a839e9d699de7d</sha512>
|
||||
<archiveName>python-3.10.5.nupkg.zip</archiveName>
|
||||
<url>https://www.nuget.org/api/v2/package/python/3.10.7</url>
|
||||
<sha512>dc763c4f3e9594619173a99740a6b54686c768c240efe316d4d3f8914383bd06420c0802781baf983ea840c49412b8330c1af93f31d2c73eb0ea22a55e71aa13</sha512>
|
||||
<archiveName>python-3.10.7.nupkg.zip</archiveName>
|
||||
</tool>
|
||||
<tool name="cmake" os="windows">
|
||||
<version>3.24.0</version>
|
||||
|
|
|
|||
|
|
@ -6013,8 +6013,8 @@
|
|||
"port-version": 5
|
||||
},
|
||||
"python3": {
|
||||
"baseline": "3.10.5",
|
||||
"port-version": 4
|
||||
"baseline": "3.10.7",
|
||||
"port-version": 0
|
||||
},
|
||||
"qca": {
|
||||
"baseline": "2.3.4",
|
||||
|
|
|
|||
|
|
@ -1,5 +1,10 @@
|
|||
{
|
||||
"versions": [
|
||||
{
|
||||
"git-tree": "047f7eca7d1000287f2389302d5c292251d023f2",
|
||||
"version": "3.10.7",
|
||||
"port-version": 0
|
||||
},
|
||||
{
|
||||
"git-tree": "a6bf44809eee3bfbce1b176e55d41beb54cac6f2",
|
||||
"version": "3.10.5",
|
||||
|
|
|
|||
Loading…
Reference in New Issue