summaryrefslogtreecommitdiff
path: root/lang/python/python3/patches-pip/001-pyproject-hooks-pyc-fix.patch
diff options
context:
space:
mode:
Diffstat (limited to 'lang/python/python3/patches-pip/001-pyproject-hooks-pyc-fix.patch')
-rw-r--r--lang/python/python3/patches-pip/001-pyproject-hooks-pyc-fix.patch20
1 files changed, 20 insertions, 0 deletions
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 000000000..72f6896f3
--- /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'))