vcpkg/ports/python3/0010-ensurepip.patch
Robert Schumacher f78f4440df
[python3] Do not ensurepip. Provide venv instructions. (#24906)
* [python3] Bootstrap pip with ${CURRENT_INSTALLED_DIR}

* [python3] Disable ensurepip -- add venv usage instructions

Co-authored-by: Max Khon <fjoe@samodelkin.net>
2022-05-31 16:20:33 -07:00

12 lines
403 B
Diff

--- a/Lib/ensurepip/__init__.py 2021-10-05 00:40:46.000000000 +0700
+++ b/Lib/ensurepip/__init__.py 2022-01-11 15:22:54.001498300 +0700
@@ -86,6 +86,8 @@
code = f"""
import runpy
import sys
+import os
+sys.executable = os.path.dirname(os.path.realpath(__file__))
sys.path = {additional_paths or []} + sys.path
sys.argv[1:] = {args}
runpy.run_module("pip", run_name="__main__", alter_sys=True)