python-pip: Update to 23.3.1, redo/refresh patches 22505/head
authorJeffery To <jeffery.to@gmail.com>
Thu, 26 Oct 2023 12:16:42 +0000 (20:16 +0800)
committerJeffery To <jeffery.to@gmail.com>
Thu, 26 Oct 2023 12:16:42 +0000 (20:16 +0800)
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 <jeffery.to@gmail.com>
lang/python/python-pip/Makefile
lang/python/python-pip/patches/001-pyproject-hooks-pyc-fix.patch
lang/python/python-pip/patches/002-pip-runner-pyc-fix.patch
lang/python/python-pip/patches/003-disable-pip-version-check.patch

index c21d2bdffd3eca0aca2fd6a22ecf68231f678b23..c41b27ca4448d3e16448a52a03cc56914d5689ea 100644 (file)
@@ -8,11 +8,11 @@
 include $(TOPDIR)/rules.mk
 
 PKG_NAME:=python-pip
-PKG_VERSION:=23.2.1
+PKG_VERSION:=23.3.1
 PKG_RELEASE:=1
 
 PYPI_NAME:=pip
-PKG_HASH:=fb0bd5435b3200c602b5bf61d2d43c2f13c02e29c1707567ae7fbc514eb9faf2
+PKG_HASH:=1fcaa041308d01f14575f6d0d2ea4b75a3e2871fe4f9c694976f908768e14174
 
 PKG_LICENSE:=MIT
 PKG_LICENSE_FILES:=LICENSE.txt
index 27681c1af4557c2b77bba1da4fd37a2f88f297da..e9eafab969dacb399efe4d6c7d096cf13c0b49de 100644 (file)
@@ -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))
index 4616fe0654e821c2d0ca8a9b0a9f7195c6a43014..8f68049a8b284f4e52bf0b3f00d08ce9a19b16ec 100644 (file)
@@ -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]:
index 87a8178a76cd639a2725198dd42207a706dddd36..99a0258aa6088434b6b6ddabd60e44bbf795d364 100644 (file)
@@ -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",