From 5661564a57f17f688abc443a43085f04ea4f2d4a Mon Sep 17 00:00:00 2001 From: Jeffery To Date: Mon, 12 Jun 2023 16:17:50 +0800 Subject: [PATCH] python3: Update to 3.9.17 This includes an updated patch for pip, as the bundled pip was also updated with this release. Signed-off-by: Jeffery To --- lang/python/python3-version.mk | 4 ++-- lang/python/python3/Makefile | 2 +- .../patches-pip/001-pep517-pyc-fix.patch | 20 ------------------- .../001-pyproject-hooks-pyc-fix.patch | 20 +++++++++++++++++++ 4 files changed, 23 insertions(+), 23 deletions(-) delete mode 100644 lang/python/python3/patches-pip/001-pep517-pyc-fix.patch create mode 100644 lang/python/python3/patches-pip/001-pyproject-hooks-pyc-fix.patch diff --git a/lang/python/python3-version.mk b/lang/python/python3-version.mk index f28c05f611..e585e49488 100644 --- a/lang/python/python3-version.mk +++ b/lang/python/python3-version.mk @@ -8,7 +8,7 @@ # Note: keep in sync with setuptools & pip PYTHON3_VERSION_MAJOR:=3 PYTHON3_VERSION_MINOR:=9 -PYTHON3_VERSION_MICRO:=16 +PYTHON3_VERSION_MICRO:=17 PYTHON3_VERSION:=$(PYTHON3_VERSION_MAJOR).$(PYTHON3_VERSION_MINOR) @@ -16,4 +16,4 @@ PYTHON3_SETUPTOOLS_PKG_RELEASE:=1 PYTHON3_PIP_PKG_RELEASE:=1 PYTHON3_SETUPTOOLS_VERSION:=58.1.0 -PYTHON3_PIP_VERSION:=22.0.4 +PYTHON3_PIP_VERSION:=23.0.1 diff --git a/lang/python/python3/Makefile b/lang/python/python3/Makefile index e86f843010..61c6bcdc85 100644 --- a/lang/python/python3/Makefile +++ b/lang/python/python3/Makefile @@ -16,7 +16,7 @@ PKG_VERSION:=$(PYTHON3_VERSION).$(PYTHON3_VERSION_MICRO) PKG_SOURCE:=Python-$(PKG_VERSION).tar.xz PKG_SOURCE_URL:=https://www.python.org/ftp/python/$(PKG_VERSION) -PKG_HASH:=22dddc099246dd2760665561e8adb7394ea0cc43a72684c6480f9380f7786439 +PKG_HASH:=30ce057c44f283f8ed93606ccbdb8d51dd526bdc4c62cce5e0dc217bfa3e8cee PKG_MAINTAINER:=Jeffery To PKG_LICENSE:=Python/2.0 diff --git a/lang/python/python3/patches-pip/001-pep517-pyc-fix.patch b/lang/python/python3/patches-pip/001-pep517-pyc-fix.patch deleted file mode 100644 index e600b0a30e..0000000000 --- a/lang/python/python3/patches-pip/001-pep517-pyc-fix.patch +++ /dev/null @@ -1,20 +0,0 @@ -diff --git a/pip/_vendor/pep517/in_process/__init__.py b/pip/_vendor/pep517/in_process/__init__.py -index c932313..a01143b 100644 ---- a/pip/_vendor/pep517/in_process/__init__.py -+++ b/pip/_vendor/pep517/in_process/__init__.py -@@ -10,8 +10,13 @@ try: - import importlib.resources as resources - - def _in_proc_script_path(): -- return resources.path(__package__, '_in_process.py') -+ if resources.is_resource(__package__, '_in_process.py'): -+ return resources.path(__package__, '_in_process.py') -+ return resources.path(__package__, '_in_process.pyc') - except ImportError: - @contextmanager - def _in_proc_script_path(): -- yield pjoin(dirname(abspath(__file__)), '_in_process.py') -+ _in_proc_script = pjoin(dirname(abspath(__file__)), '_in_process.py') -+ if not os.path.isfile(_in_proc_script): -+ _in_proc_script = pjoin(dirname(abspath(__file__)), '_in_process.pyc') -+ yield _in_proc_script diff --git a/lang/python/python3/patches-pip/001-pyproject-hooks-pyc-fix.patch b/lang/python/python3/patches-pip/001-pyproject-hooks-pyc-fix.patch new file mode 100644 index 0000000000..72f6896f30 --- /dev/null +++ b/lang/python/python3/patches-pip/001-pyproject-hooks-pyc-fix.patch @@ -0,0 +1,20 @@ +diff --git a/pip/_vendor/pyproject_hooks/_in_process/__init__.py b/pip/_vendor/pyproject_hooks/_in_process/__init__.py +index 917fa065b3c7..c9ec8efd53b3 100644 +--- a/pip/_vendor/pyproject_hooks/_in_process/__init__.py ++++ b/pip/_vendor/pyproject_hooks/_in_process/__init__.py +@@ -11,8 +11,13 @@ try: + except AttributeError: + # Python 3.8 compatibility + def _in_proc_script_path(): +- return resources.path(__package__, '_in_process.py') ++ if resources.is_resource(__package__, '_in_process.py'): ++ return resources.path(__package__, '_in_process.py') ++ return resources.path(__package__, '_in_process.pyc') + else: + def _in_proc_script_path(): ++ if resources.files(__package__).joinpath('_in_process.py').is_file(): ++ return resources.as_file( ++ resources.files(__package__).joinpath('_in_process.py')) + return resources.as_file( +- resources.files(__package__).joinpath('_in_process.py')) ++ resources.files(__package__).joinpath('_in_process.pyc')) -- 2.30.2