From 48f3131c7b9cba438c3df2ff1c02a0f54bec27bd Mon Sep 17 00:00:00 2001 From: Osyotr Date: Sat, 28 Sep 2024 16:23:03 +0300 Subject: [PATCH] [python3] Update port to 3.11.10, tools to 3.12.6 --- ports/python3/portfile.cmake | 4 ++-- ports/python3/vcpkg.json | 3 +-- .../vcpkg_find_acquire_program(PYTHON3).cmake | 15 ++++++++++----- scripts/vcpkgTools.xml | 16 ++++++++-------- versions/baseline.json | 4 ++-- versions/p-/python3.json | 5 +++++ 6 files changed, 28 insertions(+), 19 deletions(-) diff --git a/ports/python3/portfile.cmake b/ports/python3/portfile.cmake index 19985c80d6ce9e..aeb25da39e3685 100644 --- a/ports/python3/portfile.cmake +++ b/ports/python3/portfile.cmake @@ -72,8 +72,8 @@ endif() vcpkg_from_github( OUT_SOURCE_PATH SOURCE_PATH REPO python/cpython - REF v${PYTHON_VERSION} - SHA512 c2ebe72ce53dd2d59750a7b0bdaf15ebb7ecb6f67d2913a457bf5d32bd0f640815f9496f2fa3ebeac0722264d000735d90d3ffaeac2de1f066b7aee994bf9b24 + REF v${VERSION} + SHA512 411f43495943b8aeec287d4339bac6beb6a7224b0844cc4d48188b208fbbbc6404ad031b6e7a3bed0900baf972c4536a54f4da1ab39202f4f405a188ca04ae07 HEAD_REF master PATCHES ${PATCHES} ) diff --git a/ports/python3/vcpkg.json b/ports/python3/vcpkg.json index 0af7f3bfd83633..fbbb479994de4e 100644 --- a/ports/python3/vcpkg.json +++ b/ports/python3/vcpkg.json @@ -1,7 +1,6 @@ { "name": "python3", - "version": "3.11.8", - "port-version": 4, + "version": "3.11.10", "description": "The Python programming language", "homepage": "https://github.com/python/cpython", "license": "Python-2.0", diff --git a/scripts/cmake/vcpkg_find_acquire_program(PYTHON3).cmake b/scripts/cmake/vcpkg_find_acquire_program(PYTHON3).cmake index cd2d4e4a075675..2d5b3dc8b02726 100644 --- a/scripts/cmake/vcpkg_find_acquire_program(PYTHON3).cmake +++ b/scripts/cmake/vcpkg_find_acquire_program(PYTHON3).cmake @@ -1,6 +1,6 @@ if(CMAKE_HOST_WIN32) set(program_name python) - set(program_version 3.11.8) + set(program_version 3.12.6) if(DEFINED ENV{PROCESSOR_ARCHITEW6432}) set(build_arch $ENV{PROCESSOR_ARCHITEW6432}) else() @@ -10,21 +10,26 @@ if(CMAKE_HOST_WIN32) set(tool_subdirectory "python-${program_version}-arm64") set(download_urls "https://www.python.org/ftp/python/${program_version}/python-${program_version}-embed-arm64.zip") set(download_filename "python-${program_version}-embed-arm64.zip") - set(download_sha512 42b820e34c4a77fe928e0af395292d804dcbf7e1132cf353ce6ce23435a687ec580f03ccbf3cd94d98c9dc5ac951f8ca64dbd65cded7ef1d675a39d63f8ace8d) + set(download_sha512 AE87B0FDF9FA75C68A9ECF64628474819D19A57B79FB2D9BB1C3265833EE57CCC1C85C4CF696F90B80C7FAA53ADFD35E893886365202A90EEE0B879B29DA9CA1) elseif(build_arch MATCHES "(amd|AMD)64") 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 da5f01e94d3505eebdfd4d2e70d9cf494925199024479cc29ef144567906b2e8ad55a855b199a755318f5fb9a260f21b987a5fc85f31acf631af4b677921251d) + set(download_sha512 43E9EAB6FCE7E62F1BADF478706E3DF7F65A9BB0FDFF2EE01F71C65425ACD8D73E4E0DCC64A6EE59A7D934BE7271A4F0B9FE3E0DA62A5BA636663F628BD7FBD7) else() 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 c88ef02f0860000dbc59361cfe051e3e8dc7d208ed39bb5bc20a3e8b8711b578926e281a11941787ea61b2ef05b945ab3133322dcb85b916f79ac4ada57f6309) + set(download_sha512 1E1BAE458232E336799DDA220366D6BF9F4F54E4FE7E341E287FF9DB773E8D7C3E03004BA820C7DDB04EF1CE93064F002B96CA4E49326D749055E7D5F3C9ED2D) endif() set(paths_to_search "${DOWNLOADS}/tools/python/${tool_subdirectory}") - vcpkg_list(SET post_install_command "${CMAKE_COMMAND}" -E rm python311._pth) + + # We want to be able to import stuff from outside of this embeddable package. + # https://docs.python.org/3/library/sys_path_init.html#pth-files + string(REGEX MATCH "^3\\.[0-9]+" _python_version_plain "${program_version}") + string(REPLACE "." "" _python_version_plain "${_python_version_plain}") + vcpkg_list(SET post_install_command "${CMAKE_COMMAND}" -E rm "python${_python_version_plain}._pth") else() set(program_name python3) set(brew_package_name "python") diff --git a/scripts/vcpkgTools.xml b/scripts/vcpkgTools.xml index ef0b6f6175b8e8..632dbe2ebc9283 100644 --- a/scripts/vcpkgTools.xml +++ b/scripts/vcpkgTools.xml @@ -1,18 +1,18 @@ - 3.11.8 + 3.12.6 python.exe - https://www.python.org/ftp/python/3.11.8/python-3.11.8-embed-win32.zip - c88ef02f0860000dbc59361cfe051e3e8dc7d208ed39bb5bc20a3e8b8711b578926e281a11941787ea61b2ef05b945ab3133322dcb85b916f79ac4ada57f6309 - python-3.11.8-embed-win32.zip + https://www.python.org/ftp/python/3.12.6/python-3.12.6-embed-win32.zip + 1e1bae458232e336799dda220366d6bf9f4f54e4fe7e341e287ff9db773e8d7c3e03004ba820c7ddb04ef1ce93064f002b96ca4e49326d749055e7d5f3c9ed2d + python-3.12.6-embed-win32.zip - 3.11.8 + 3.12.6 tools\python.exe - https://www.nuget.org/api/v2/package/python/3.11.8 - 8c1abd622fb2795fb87ab5208764fe13f7f4d69f2283b4237ea47b7c14b0989b5b4169f1ac1d3b1f417c6c2cc3d85ce151370dae8efc807c93e57cd67fa3c8cf - python-3.11.8.nupkg.zip + https://www.nuget.org/api/v2/package/python/3.12.6 + 2c7aea2435ee076140e366149d23e8c8280b3f90b419d29461d2312dcf761452586400684cb15d471530a07d2b513d0b19d0c83d670356785e68bd96bccacf4e + python-3.12.6.nupkg.zip 3.29.2 diff --git a/versions/baseline.json b/versions/baseline.json index 3c95f95dc94f1d..892856bc9eb5be 100644 --- a/versions/baseline.json +++ b/versions/baseline.json @@ -7253,8 +7253,8 @@ "port-version": 7 }, "python3": { - "baseline": "3.11.8", - "port-version": 4 + "baseline": "3.11.10", + "port-version": 0 }, "qca": { "baseline": "2.3.7", diff --git a/versions/p-/python3.json b/versions/p-/python3.json index 5d582b5cbbdc7f..9592df0462f632 100644 --- a/versions/p-/python3.json +++ b/versions/p-/python3.json @@ -1,5 +1,10 @@ { "versions": [ + { + "git-tree": "ff25fd52893b5c061d8baad2a5b1bcbef9da62ef", + "version": "3.11.10", + "port-version": 0 + }, { "git-tree": "42da794facada8d85273d1efcc53f1af7e8cb243", "version": "3.11.8",