packages/lang/python/python-pip/patches/002-pip-runner-pyc-fix.patch
Jeffery To 548fdba3fd
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 <jeffery.to@gmail.com>
2023-10-26 20:16:42 +08:00

15 lines
481 B
Diff

--- a/src/pip/_internal/build_env.py
+++ b/src/pip/_internal/build_env.py
@@ -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")
+ 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]: