From 15dab6a7628cb11cc9bea72a5065eeb473099e7c Mon Sep 17 00:00:00 2001 From: Adam Johnson Date: Wed, 6 Oct 2021 15:53:06 -0400 Subject: [python3] Upgrade to Python 3.10.0 (#20519) * [python3] Update to Python 3.10.0rc2 (for testing). * [python3] Revert trivial patch changes. * [python3] Bump to 3.10.0 final. * x-add-version * update python tools to 3.10.0 * [ecm] Add patch from upstream for Python 3.10. Remove this on the next release. * x-add-version * [python3] Add patch to fix static interpreter. * x-add-version --- ports/python3/0001-static-library.patch | 14 ++ ports/python3/0006-fix-duplicate-symbols.patch | 39 ----- .../0006-restore-support-for-windows-7.patch | 178 +++++++++++++++++++++ .../0007-restore-support-for-windows-7.patch | 178 --------------------- ...rkaround-windows-11-sdk-rc-compiler-error.patch | 30 ++++ ...rkaround-windows-11-sdk-rc-compiler-error.patch | 30 ---- ports/python3/portfile.cmake | 11 +- ports/python3/vcpkg.json | 3 +- 8 files changed, 228 insertions(+), 255 deletions(-) delete mode 100644 ports/python3/0006-fix-duplicate-symbols.patch create mode 100644 ports/python3/0006-restore-support-for-windows-7.patch delete mode 100644 ports/python3/0007-restore-support-for-windows-7.patch create mode 100644 ports/python3/0007-workaround-windows-11-sdk-rc-compiler-error.patch delete mode 100644 ports/python3/0008-workaround-windows-11-sdk-rc-compiler-error.patch (limited to 'ports/python3') diff --git a/ports/python3/0001-static-library.patch b/ports/python3/0001-static-library.patch index 93a89a2e3..eef387574 100644 --- a/ports/python3/0001-static-library.patch +++ b/ports/python3/0001-static-library.patch @@ -58,6 +58,20 @@ index 2625d0293d..2f8bdaa931 100644 _Py_HAVE_ZLIB;%(PreprocessorDefinitions) +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) + #ifdef MS_COREDLL + SET_SYS("dllhandle", PyLong_FromVoidPtr(PyWin_DLLhModule)); + SET_SYS_FROM_STRING("winver", PyWin_DLLVersionString); ++#elif defined(MS_WINDOWS) ++ SET_SYS("dllhandle", PyLong_FromVoidPtr(NULL)); ++ SET_SYS_FROM_STRING("winver", MS_DLL_ID); + #endif + #ifdef ABIFLAGS + SET_SYS_FROM_STRING("abiflags", ABIFLAGS); -- 2.28.0.windows.1 diff --git a/ports/python3/0006-fix-duplicate-symbols.patch b/ports/python3/0006-fix-duplicate-symbols.patch deleted file mode 100644 index 251c0186a..000000000 --- a/ports/python3/0006-fix-duplicate-symbols.patch +++ /dev/null @@ -1,39 +0,0 @@ -From 62e082c1eba79d46ba8ab4b7a556a57a2253d555 Mon Sep 17 00:00:00 2001 -From: Adam Johnson -Date: Fri, 11 Sep 2020 12:35:36 -0400 -Subject: [PATCH 6/6] fix duplicate symbols - ---- - Modules/_winapi.c | 2 +- - Modules/overlapped.c | 2 +- - 2 files changed, 2 insertions(+), 2 deletions(-) - -diff --git a/Modules/_winapi.c b/Modules/_winapi.c -index e1672c4785..27148094d2 100644 ---- a/Modules/_winapi.c -+++ b/Modules/_winapi.c -@@ -304,7 +304,7 @@ static PyMemberDef overlapped_members[] = { - {NULL} - }; - --PyTypeObject OverlappedType = { -+static PyTypeObject OverlappedType = { - PyVarObject_HEAD_INIT(NULL, 0) - /* tp_name */ "_winapi.Overlapped", - /* tp_basicsize */ sizeof(OverlappedObject), -diff --git a/Modules/overlapped.c b/Modules/overlapped.c -index cd7869fa8a..319ea0a4b7 100644 ---- a/Modules/overlapped.c -+++ b/Modules/overlapped.c -@@ -1756,7 +1756,7 @@ static PyGetSetDef Overlapped_getsets[] = { - {NULL}, - }; - --PyTypeObject OverlappedType = { -+static PyTypeObject OverlappedType = { - PyVarObject_HEAD_INIT(NULL, 0) - /* tp_name */ "_overlapped.Overlapped", - /* tp_basicsize */ sizeof(OverlappedObject), --- -2.28.0.windows.1 - diff --git a/ports/python3/0006-restore-support-for-windows-7.patch b/ports/python3/0006-restore-support-for-windows-7.patch new file mode 100644 index 000000000..837666393 --- /dev/null +++ b/ports/python3/0006-restore-support-for-windows-7.patch @@ -0,0 +1,178 @@ +From e30a560527d17ae81685dd11d3268bc982af2048 Mon Sep 17 00:00:00 2001 +From: Adam Johnson +Date: Tue, 16 Feb 2021 18:03:07 -0500 +Subject: [PATCH 7/7] restore support for windows 7 + +this backports the windows 7 compatible fix for bpo-39401 from gh-18234, +originally authored by Steve Dower, and removes explicit dependencies on +pathcch. + +The same mechanism is applied to fix posixmodule.c +--- +diff --git a/Modules/posixmodule.c b/Modules/posixmodule.c +index c984e2e..6c9787a 100644 +--- a/Modules/posixmodule.c ++++ b/Modules/posixmodule.c +@@ -18,7 +18,7 @@ + + FSCTL_GET_REPARSE_POINT is not exported with WIN32_LEAN_AND_MEAN. */ + # include +-# include ++# include + #endif + + #include "pycore_ceval.h" // _PyEval_ReInitThreads() +@@ -4371,6 +4371,10 @@ os._path_splitroot + Removes everything after the root on Win32. + [clinic start generated code]*/ + ++static int _PathCchSkipRoot_Initialized = 0; ++typedef HRESULT (__stdcall *PPathCchSkipRoot) (PCWSTR pszPath, PCWSTR *ppszRootEnd); ++static PPathCchSkipRoot _PathCchSkipRoot; ++ + static PyObject * + os__path_splitroot_impl(PyObject *module, path_t *path) + /*[clinic end generated code: output=ab7f1a88b654581c input=dc93b1d3984cffb6]*/ +@@ -4380,6 +4384,19 @@ os__path_splitroot_impl(PyObject *module, path_t *path) + PyObject *result = NULL; + HRESULT ret; + ++ if (_PathCchSkipRoot_Initialized == 0) { ++ HMODULE pathapi = LoadLibraryExW(L"api-ms-win-core-path-l1-1-0.dll", NULL, ++ LOAD_LIBRARY_SEARCH_SYSTEM32); ++ ++ if (pathapi) { ++ _PathCchSkipRoot = (PPathCchSkipRoot)GetProcAddress(pathapi, "PathCchSkipRoot"); ++ } else { ++ _PathCchSkipRoot = NULL; ++ } ++ ++ _PathCchSkipRoot_Initialized = 1; ++ } ++ + buffer = (wchar_t*)PyMem_Malloc(sizeof(wchar_t) * (wcslen(path->wide) + 1)); + if (!buffer) { + return NULL; +@@ -4390,7 +4407,14 @@ os__path_splitroot_impl(PyObject *module, path_t *path) + } + + Py_BEGIN_ALLOW_THREADS +- ret = PathCchSkipRoot(buffer, &end); ++ if (_PathCchSkipRoot) { ++ ret = _PathCchSkipRoot(buffer, &end); ++ } else { ++ end = PathSkipRootW(buffer); ++ if (!end) { ++ ret = E_FAIL; ++ } ++ } + Py_END_ALLOW_THREADS + if (FAILED(ret)) { + result = Py_BuildValue("sO", "", path->object); +diff --git a/PC/getpathp.c b/PC/getpathp.c +index 53da3a6..3d58bbf 100644 +--- a/PC/getpathp.c ++++ b/PC/getpathp.c +@@ -250,14 +250,43 @@ ismodule(wchar_t *filename, int update_filename) + stuff as fits will be appended. + */ + ++ ++static int _PathCchCombineEx_Initialized = 0; ++typedef HRESULT(__stdcall *PPathCchCombineEx) (PWSTR pszPathOut, size_t cchPathOut, ++ PCWSTR pszPathIn, PCWSTR pszMore, ++ unsigned long dwFlags); ++static PPathCchCombineEx _PathCchCombineEx; ++ + static void + join(wchar_t *buffer, const wchar_t *stuff) + { +- if (FAILED(PathCchCombineEx(buffer, MAXPATHLEN+1, buffer, stuff, 0))) { +- Py_FatalError("buffer overflow in getpathp.c's join()"); ++ if (_PathCchCombineEx_Initialized == 0) { ++ HMODULE pathapi = LoadLibraryExW(L"api-ms-win-core-path-l1-1-0.dll", NULL, ++ LOAD_LIBRARY_SEARCH_SYSTEM32); ++ if (pathapi) { ++ _PathCchCombineEx = (PPathCchCombineEx)GetProcAddress(pathapi, "PathCchCombineEx"); ++ } ++ else { ++ _PathCchCombineEx = NULL; ++ } ++ _PathCchCombineEx_Initialized = 1; ++ } ++ if (_PathCchCombineEx) { ++ if (FAILED(_PathCchCombineEx(buffer, MAXPATHLEN+1, buffer, stuff, 0))) { ++ Py_FatalError("buffer overflow in getpathp.c's join()"); ++ } ++ } else { ++ if (!PathCombineW(buffer, buffer, stuff)) { ++ Py_FatalError("buffer overflow in getpathp.c's join()"); ++ } + } + } + ++static int _PathCchCanonicalizeEx_Initialized = 0; ++typedef HRESULT(__stdcall *PPathCchCanonicalizeEx) (PWSTR pszPathOut, size_t cchPathOut, ++ PCWSTR pszPathIn, unsigned long dwFlags); ++static PPathCchCanonicalizeEx _PathCchCanonicalizeEx; ++ + /* Call PathCchCanonicalizeEx(path): remove navigation elements such as "." + and ".." to produce a direct, well-formed path. */ + static PyStatus +@@ -267,8 +296,26 @@ canonicalize(wchar_t *buffer, const wchar_t *path) + return _PyStatus_NO_MEMORY(); + } + +- if (FAILED(PathCchCanonicalizeEx(buffer, MAXPATHLEN + 1, path, 0))) { +- return INIT_ERR_BUFFER_OVERFLOW(); ++ if (_PathCchCanonicalizeEx_Initialized == 0) { ++ HMODULE pathapi = LoadLibraryExW(L"api-ms-win-core-path-l1-1-0.dll", NULL, ++ LOAD_LIBRARY_SEARCH_SYSTEM32); ++ if (pathapi) { ++ _PathCchCanonicalizeEx = (PPathCchCanonicalizeEx)GetProcAddress(pathapi, "PathCchCanonicalizeEx"); ++ } ++ else { ++ _PathCchCanonicalizeEx = NULL; ++ } ++ _PathCchCanonicalizeEx_Initialized = 1; ++ } ++ if (_PathCchCanonicalizeEx) { ++ if (FAILED(_PathCchCanonicalizeEx(buffer, MAXPATHLEN + 1, path, 0))) { ++ return INIT_ERR_BUFFER_OVERFLOW(); ++ } ++ } ++ else { ++ if (!PathCanonicalizeW(buffer, path)) { ++ return INIT_ERR_BUFFER_OVERFLOW(); ++ } + } + return _PyStatus_OK(); + } +diff --git a/PC/pyconfig.h b/PC/pyconfig.h +index d7d3cf0..6e9c090 100644 +--- a/PC/pyconfig.h ++++ b/PC/pyconfig.h +@@ -136,8 +136,8 @@ WIN32 is still required for the locale module. + + /* set the version macros for the windows headers */ + /* Python 3.9+ requires Windows 8 or greater */ +-#define Py_WINVER 0x0602 /* _WIN32_WINNT_WIN8 */ +-#define Py_NTDDI NTDDI_WIN8 ++#define Py_WINVER 0x0601 /* _WIN32_WINNT_WIN7 */ ++#define Py_NTDDI NTDDI_WIN7 + + /* We only set these values when building Python - we don't want to force + these values on extensions, as that will affect the prototypes and +diff --git a/PCbuild/pythoncore.vcxproj b/PCbuild/pythoncore.vcxproj +index 2625d02..20e3d6e 100644 +--- a/PCbuild/pythoncore.vcxproj ++++ b/PCbuild/pythoncore.vcxproj +@@ -106,7 +106,7 @@ + _Py_HAVE_ZLIB;%(PreprocessorDefinitions) + + +- version.lib;shlwapi.lib;ws2_32.lib;pathcch.lib;%(AdditionalDependencies) ++ version.lib;shlwapi.lib;ws2_32.lib;%(AdditionalDependencies) + + + diff --git a/ports/python3/0007-restore-support-for-windows-7.patch b/ports/python3/0007-restore-support-for-windows-7.patch deleted file mode 100644 index 837666393..000000000 --- a/ports/python3/0007-restore-support-for-windows-7.patch +++ /dev/null @@ -1,178 +0,0 @@ -From e30a560527d17ae81685dd11d3268bc982af2048 Mon Sep 17 00:00:00 2001 -From: Adam Johnson -Date: Tue, 16 Feb 2021 18:03:07 -0500 -Subject: [PATCH 7/7] restore support for windows 7 - -this backports the windows 7 compatible fix for bpo-39401 from gh-18234, -originally authored by Steve Dower, and removes explicit dependencies on -pathcch. - -The same mechanism is applied to fix posixmodule.c ---- -diff --git a/Modules/posixmodule.c b/Modules/posixmodule.c -index c984e2e..6c9787a 100644 ---- a/Modules/posixmodule.c -+++ b/Modules/posixmodule.c -@@ -18,7 +18,7 @@ - - FSCTL_GET_REPARSE_POINT is not exported with WIN32_LEAN_AND_MEAN. */ - # include --# include -+# include - #endif - - #include "pycore_ceval.h" // _PyEval_ReInitThreads() -@@ -4371,6 +4371,10 @@ os._path_splitroot - Removes everything after the root on Win32. - [clinic start generated code]*/ - -+static int _PathCchSkipRoot_Initialized = 0; -+typedef HRESULT (__stdcall *PPathCchSkipRoot) (PCWSTR pszPath, PCWSTR *ppszRootEnd); -+static PPathCchSkipRoot _PathCchSkipRoot; -+ - static PyObject * - os__path_splitroot_impl(PyObject *module, path_t *path) - /*[clinic end generated code: output=ab7f1a88b654581c input=dc93b1d3984cffb6]*/ -@@ -4380,6 +4384,19 @@ os__path_splitroot_impl(PyObject *module, path_t *path) - PyObject *result = NULL; - HRESULT ret; - -+ if (_PathCchSkipRoot_Initialized == 0) { -+ HMODULE pathapi = LoadLibraryExW(L"api-ms-win-core-path-l1-1-0.dll", NULL, -+ LOAD_LIBRARY_SEARCH_SYSTEM32); -+ -+ if (pathapi) { -+ _PathCchSkipRoot = (PPathCchSkipRoot)GetProcAddress(pathapi, "PathCchSkipRoot"); -+ } else { -+ _PathCchSkipRoot = NULL; -+ } -+ -+ _PathCchSkipRoot_Initialized = 1; -+ } -+ - buffer = (wchar_t*)PyMem_Malloc(sizeof(wchar_t) * (wcslen(path->wide) + 1)); - if (!buffer) { - return NULL; -@@ -4390,7 +4407,14 @@ os__path_splitroot_impl(PyObject *module, path_t *path) - } - - Py_BEGIN_ALLOW_THREADS -- ret = PathCchSkipRoot(buffer, &end); -+ if (_PathCchSkipRoot) { -+ ret = _PathCchSkipRoot(buffer, &end); -+ } else { -+ end = PathSkipRootW(buffer); -+ if (!end) { -+ ret = E_FAIL; -+ } -+ } - Py_END_ALLOW_THREADS - if (FAILED(ret)) { - result = Py_BuildValue("sO", "", path->object); -diff --git a/PC/getpathp.c b/PC/getpathp.c -index 53da3a6..3d58bbf 100644 ---- a/PC/getpathp.c -+++ b/PC/getpathp.c -@@ -250,14 +250,43 @@ ismodule(wchar_t *filename, int update_filename) - stuff as fits will be appended. - */ - -+ -+static int _PathCchCombineEx_Initialized = 0; -+typedef HRESULT(__stdcall *PPathCchCombineEx) (PWSTR pszPathOut, size_t cchPathOut, -+ PCWSTR pszPathIn, PCWSTR pszMore, -+ unsigned long dwFlags); -+static PPathCchCombineEx _PathCchCombineEx; -+ - static void - join(wchar_t *buffer, const wchar_t *stuff) - { -- if (FAILED(PathCchCombineEx(buffer, MAXPATHLEN+1, buffer, stuff, 0))) { -- Py_FatalError("buffer overflow in getpathp.c's join()"); -+ if (_PathCchCombineEx_Initialized == 0) { -+ HMODULE pathapi = LoadLibraryExW(L"api-ms-win-core-path-l1-1-0.dll", NULL, -+ LOAD_LIBRARY_SEARCH_SYSTEM32); -+ if (pathapi) { -+ _PathCchCombineEx = (PPathCchCombineEx)GetProcAddress(pathapi, "PathCchCombineEx"); -+ } -+ else { -+ _PathCchCombineEx = NULL; -+ } -+ _PathCchCombineEx_Initialized = 1; -+ } -+ if (_PathCchCombineEx) { -+ if (FAILED(_PathCchCombineEx(buffer, MAXPATHLEN+1, buffer, stuff, 0))) { -+ Py_FatalError("buffer overflow in getpathp.c's join()"); -+ } -+ } else { -+ if (!PathCombineW(buffer, buffer, stuff)) { -+ Py_FatalError("buffer overflow in getpathp.c's join()"); -+ } - } - } - -+static int _PathCchCanonicalizeEx_Initialized = 0; -+typedef HRESULT(__stdcall *PPathCchCanonicalizeEx) (PWSTR pszPathOut, size_t cchPathOut, -+ PCWSTR pszPathIn, unsigned long dwFlags); -+static PPathCchCanonicalizeEx _PathCchCanonicalizeEx; -+ - /* Call PathCchCanonicalizeEx(path): remove navigation elements such as "." - and ".." to produce a direct, well-formed path. */ - static PyStatus -@@ -267,8 +296,26 @@ canonicalize(wchar_t *buffer, const wchar_t *path) - return _PyStatus_NO_MEMORY(); - } - -- if (FAILED(PathCchCanonicalizeEx(buffer, MAXPATHLEN + 1, path, 0))) { -- return INIT_ERR_BUFFER_OVERFLOW(); -+ if (_PathCchCanonicalizeEx_Initialized == 0) { -+ HMODULE pathapi = LoadLibraryExW(L"api-ms-win-core-path-l1-1-0.dll", NULL, -+ LOAD_LIBRARY_SEARCH_SYSTEM32); -+ if (pathapi) { -+ _PathCchCanonicalizeEx = (PPathCchCanonicalizeEx)GetProcAddress(pathapi, "PathCchCanonicalizeEx"); -+ } -+ else { -+ _PathCchCanonicalizeEx = NULL; -+ } -+ _PathCchCanonicalizeEx_Initialized = 1; -+ } -+ if (_PathCchCanonicalizeEx) { -+ if (FAILED(_PathCchCanonicalizeEx(buffer, MAXPATHLEN + 1, path, 0))) { -+ return INIT_ERR_BUFFER_OVERFLOW(); -+ } -+ } -+ else { -+ if (!PathCanonicalizeW(buffer, path)) { -+ return INIT_ERR_BUFFER_OVERFLOW(); -+ } - } - return _PyStatus_OK(); - } -diff --git a/PC/pyconfig.h b/PC/pyconfig.h -index d7d3cf0..6e9c090 100644 ---- a/PC/pyconfig.h -+++ b/PC/pyconfig.h -@@ -136,8 +136,8 @@ WIN32 is still required for the locale module. - - /* set the version macros for the windows headers */ - /* Python 3.9+ requires Windows 8 or greater */ --#define Py_WINVER 0x0602 /* _WIN32_WINNT_WIN8 */ --#define Py_NTDDI NTDDI_WIN8 -+#define Py_WINVER 0x0601 /* _WIN32_WINNT_WIN7 */ -+#define Py_NTDDI NTDDI_WIN7 - - /* We only set these values when building Python - we don't want to force - these values on extensions, as that will affect the prototypes and -diff --git a/PCbuild/pythoncore.vcxproj b/PCbuild/pythoncore.vcxproj -index 2625d02..20e3d6e 100644 ---- a/PCbuild/pythoncore.vcxproj -+++ b/PCbuild/pythoncore.vcxproj -@@ -106,7 +106,7 @@ - _Py_HAVE_ZLIB;%(PreprocessorDefinitions) - - -- version.lib;shlwapi.lib;ws2_32.lib;pathcch.lib;%(AdditionalDependencies) -+ version.lib;shlwapi.lib;ws2_32.lib;%(AdditionalDependencies) - - - diff --git a/ports/python3/0007-workaround-windows-11-sdk-rc-compiler-error.patch b/ports/python3/0007-workaround-windows-11-sdk-rc-compiler-error.patch new file mode 100644 index 000000000..e5f8237d1 --- /dev/null +++ b/ports/python3/0007-workaround-windows-11-sdk-rc-compiler-error.patch @@ -0,0 +1,30 @@ +From 0a72b7061ed79c5d6d37b41a5b1610e32fb371a4 Mon Sep 17 00:00:00 2001 +From: Adam Johnson +Date: Wed, 22 Sep 2021 21:04:21 -0400 +Subject: [PATCH] workaround windows 11 sdk rc compiler error + +winnt.h was changed to error if the `SYSTEM_CACHE_ALIGNMENT` cannot be +determined. when the RC compiler is invoked, this seems to fail where +previous SDKs silently set the ARM value. +--- + PC/python_ver_rc.h | 7 +++++++ + 1 file changed, 7 insertions(+) + +diff --git a/PC/python_ver_rc.h b/PC/python_ver_rc.h +index 90fc6ba1a1..e313a5138e 100644 +--- a/PC/python_ver_rc.h ++++ b/PC/python_ver_rc.h +@@ -1,3 +1,10 @@ ++// Temporarily workaround bug in Windows SDK 10.0.22000.0 winnt.h ++#ifdef RC_INVOKED ++# ifndef SYSTEM_CACHE_ALIGNMENT_SIZE ++# define SYSTEM_CACHE_ALIGNMENT_SIZE 64 ++# endif ++#endif ++ + // Resource script for Python core DLL. + // Currently only holds version information. + // +-- +2.33.0.windows.1 + diff --git a/ports/python3/0008-workaround-windows-11-sdk-rc-compiler-error.patch b/ports/python3/0008-workaround-windows-11-sdk-rc-compiler-error.patch deleted file mode 100644 index e5f8237d1..000000000 --- a/ports/python3/0008-workaround-windows-11-sdk-rc-compiler-error.patch +++ /dev/null @@ -1,30 +0,0 @@ -From 0a72b7061ed79c5d6d37b41a5b1610e32fb371a4 Mon Sep 17 00:00:00 2001 -From: Adam Johnson -Date: Wed, 22 Sep 2021 21:04:21 -0400 -Subject: [PATCH] workaround windows 11 sdk rc compiler error - -winnt.h was changed to error if the `SYSTEM_CACHE_ALIGNMENT` cannot be -determined. when the RC compiler is invoked, this seems to fail where -previous SDKs silently set the ARM value. ---- - PC/python_ver_rc.h | 7 +++++++ - 1 file changed, 7 insertions(+) - -diff --git a/PC/python_ver_rc.h b/PC/python_ver_rc.h -index 90fc6ba1a1..e313a5138e 100644 ---- a/PC/python_ver_rc.h -+++ b/PC/python_ver_rc.h -@@ -1,3 +1,10 @@ -+// Temporarily workaround bug in Windows SDK 10.0.22000.0 winnt.h -+#ifdef RC_INVOKED -+# ifndef SYSTEM_CACHE_ALIGNMENT_SIZE -+# define SYSTEM_CACHE_ALIGNMENT_SIZE 64 -+# endif -+#endif -+ - // Resource script for Python core DLL. - // Currently only holds version information. - // --- -2.33.0.windows.1 - diff --git a/ports/python3/portfile.cmake b/ports/python3/portfile.cmake index 8967d5a3d..b57de25bb 100644 --- a/ports/python3/portfile.cmake +++ b/ports/python3/portfile.cmake @@ -4,8 +4,8 @@ if (VCPKG_LIBRARY_LINKAGE STREQUAL dynamic AND VCPKG_CRT_LINKAGE STREQUAL static endif() set(PYTHON_VERSION_MAJOR 3) -set(PYTHON_VERSION_MINOR 9) -set(PYTHON_VERSION_PATCH 7) +set(PYTHON_VERSION_MINOR 10) +set(PYTHON_VERSION_PATCH 0) set(PYTHON_VERSION ${PYTHON_VERSION_MAJOR}.${PYTHON_VERSION_MINOR}.${PYTHON_VERSION_PATCH}) set(PATCHES @@ -13,7 +13,6 @@ set(PATCHES 0003-devendor-external-dependencies.patch 0004-dont-copy-vcruntime.patch 0005-only-build-required-projects.patch - 0006-fix-duplicate-symbols.patch ) if(VCPKG_LIBRARY_LINKAGE STREQUAL "static") list(PREPEND PATCHES 0001-static-library.patch) @@ -22,7 +21,7 @@ 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) + list(APPEND PATCHES 0006-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.") @@ -32,7 +31,7 @@ endif() if(VCPKG_TARGET_IS_WINDOWS OR VCPKG_TARGET_IS_UWP) vcpkg_get_windows_sdk(WINSDK_VERSION) if("${WINSDK_VERSION}" VERSION_GREATER_EQUAL "10.0.22000") - list(APPEND PATCHES "0008-workaround-windows-11-sdk-rc-compiler-error.patch") + list(APPEND PATCHES "0007-workaround-windows-11-sdk-rc-compiler-error.patch") endif() endif() @@ -40,7 +39,7 @@ vcpkg_from_github( OUT_SOURCE_PATH SOURCE_PATH REPO python/cpython REF v${PYTHON_VERSION} - SHA512 05de4e485fb6f5f21e4e48fb4d7ec0e9a420fab243cba08663e52b8062f86df3e4f57b8afd49ad94d363ca0972ab85efe132b980a7f84188c82814b6df0ba191 + SHA512 d83e0685c274be09da7833a3c24b7379ae0e43b43c131f11bfaccd5902f6a1c510a3ae67c42471a4281922ead3bd34856608ec47be7dd76ddd734e59906ba03b HEAD_REF master PATCHES ${PATCHES} ) diff --git a/ports/python3/vcpkg.json b/ports/python3/vcpkg.json index c3bec2e6b..22ec71666 100644 --- a/ports/python3/vcpkg.json +++ b/ports/python3/vcpkg.json @@ -1,7 +1,6 @@ { "name": "python3", - "version-semver": "3.9.7", - "port-version": 2, + "version-semver": "3.10.0", "description": "The Python programming language", "homepage": "https://github.com/python/cpython", "supports": "!(arm | uwp)", -- cgit v1.2.3