From 548fdba3fdc832fca85f953ca78ddf322efb016d Mon Sep 17 00:00:00 2001 From: Jeffery To Date: Thu, 26 Oct 2023 20:16:42 +0800 Subject: python-pip: Update to 23.3.1, redo/refresh patches 001-pyproject-hooks-pyc-fix.patch and 002-pip-runner-pyc-fix.patch are redone to use source files if they are present. Signed-off-by: Jeffery To --- .../python-pip/patches/001-pyproject-hooks-pyc-fix.patch | 12 +++++++++--- lang/python/python-pip/patches/002-pip-runner-pyc-fix.patch | 8 ++++++-- .../python-pip/patches/003-disable-pip-version-check.patch | 2 +- 3 files changed, 16 insertions(+), 6 deletions(-) (limited to 'lang/python/python-pip/patches') diff --git a/lang/python/python-pip/patches/001-pyproject-hooks-pyc-fix.patch b/lang/python/python-pip/patches/001-pyproject-hooks-pyc-fix.patch index 27681c1af..e9eafab96 100644 --- a/lang/python/python-pip/patches/001-pyproject-hooks-pyc-fix.patch +++ b/lang/python/python-pip/patches/001-pyproject-hooks-pyc-fix.patch @@ -1,13 +1,19 @@ --- a/src/pip/_vendor/pyproject_hooks/_in_process/__init__.py +++ b/src/pip/_vendor/pyproject_hooks/_in_process/__init__.py -@@ -11,8 +11,8 @@ try: +@@ -11,8 +11,14 @@ try: except AttributeError: # Python 3.8 compatibility def _in_proc_script_path(): - return resources.path(__package__, '_in_process.py') -+ return resources.path(__package__, '_in_process.pyc') ++ filename = '_in_process.pyc' ++ if resources.is_resource(__package__, '_in_process.py'): ++ filename = '_in_process.py' ++ return resources.path(__package__, filename) else: def _in_proc_script_path(): ++ filename = '_in_process.pyc' ++ if resources.files(__package__).joinpath('_in_process.py').is_file(): ++ filename = '_in_process.py' return resources.as_file( - resources.files(__package__).joinpath('_in_process.py')) -+ resources.files(__package__).joinpath('_in_process.pyc')) ++ resources.files(__package__).joinpath(filename)) diff --git a/lang/python/python-pip/patches/002-pip-runner-pyc-fix.patch b/lang/python/python-pip/patches/002-pip-runner-pyc-fix.patch index 4616fe065..8f68049a8 100644 --- a/lang/python/python-pip/patches/002-pip-runner-pyc-fix.patch +++ b/lang/python/python-pip/patches/002-pip-runner-pyc-fix.patch @@ -1,11 +1,15 @@ --- a/src/pip/_internal/build_env.py +++ b/src/pip/_internal/build_env.py -@@ -54,7 +54,7 @@ def get_runnable_pip() -> str: +@@ -54,7 +54,11 @@ def get_runnable_pip() -> str: # case, we can use that directly. return str(source) - return os.fsdecode(source / "__pip-runner__.py") -+ return os.fsdecode(source / "__pip-runner__.pyc") ++ filename = "__pip-runner__.pyc" ++ py = source / "__pip-runner__.py" ++ if py.is_file(): ++ filename = "__pip-runner__.py" ++ return os.fsdecode(source / filename) def _get_system_sitepackages() -> Set[str]: diff --git a/lang/python/python-pip/patches/003-disable-pip-version-check.patch b/lang/python/python-pip/patches/003-disable-pip-version-check.patch index 87a8178a7..99a0258aa 100644 --- a/lang/python/python-pip/patches/003-disable-pip-version-check.patch +++ b/lang/python/python-pip/patches/003-disable-pip-version-check.patch @@ -9,7 +9,7 @@ Patch-Name: disable-pip-version-check.patch --- a/src/pip/_internal/cli/cmdoptions.py +++ b/src/pip/_internal/cli/cmdoptions.py -@@ -892,7 +892,7 @@ disable_pip_version_check: Callable[..., +@@ -895,7 +895,7 @@ disable_pip_version_check: Callable[..., "--disable-pip-version-check", dest="disable_pip_version_check", action="store_true", -- cgit