summaryrefslogtreecommitdiff
path: root/lang/python/python-pip/patches/001-pyproject-hooks-pyc-fix.patch
diff options
context:
space:
mode:
authorAlexandru Ardelean <alex@shruggie.ro>2023-10-30 09:05:06 +0200
committerGitHub <noreply@github.com>2023-10-30 09:05:06 +0200
commitce21a91dc2d5cdbadb77d3f1cb8d8f44ea21beae (patch)
treed6de22ef02667d1231e968cdae4f659fe37a3276 /lang/python/python-pip/patches/001-pyproject-hooks-pyc-fix.patch
parent5b61eeb827661ae009b11f160460c90c1b651d29 (diff)
parent548fdba3fdc832fca85f953ca78ddf322efb016d (diff)
Merge pull request #22505 from jefferyto/python-pip-23.3.1
python-pip: Update to 23.3.1, redo/refresh patches
Diffstat (limited to 'lang/python/python-pip/patches/001-pyproject-hooks-pyc-fix.patch')
-rw-r--r--lang/python/python-pip/patches/001-pyproject-hooks-pyc-fix.patch12
1 files changed, 9 insertions, 3 deletions
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))