forked from microsoft/vcpkg
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[python3] Do not ensurepip. Provide venv instructions. (microsoft#24906)
* [python3] Bootstrap pip with ${CURRENT_INSTALLED_DIR} * [python3] Disable ensurepip -- add venv usage instructions Co-authored-by: Max Khon <[email protected]>
- Loading branch information
1 parent
145848f
commit f78f444
Showing
7 changed files
with
49 additions
and
15 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
--- 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) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
The package python3 provides a python interpreter that supports virtual environments: | ||
|
||
$ tools/python3/python3.10 -m venv /path/to/venv | ||
$ export VIRTUAL_ENV=/path/to/venv | ||
$ export PATH=/path/to/venv/bin:$PATH | ||
$ export -n PYTHONHOME | ||
$ unset PYTHONHOME | ||
|
||
See https://docs.python.org/3/library/venv.html for more details. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
The package python3 provides a python interpreter that supports virtual environments: | ||
|
||
>tools\python3\python3.10 -m venv c:\path\to\venv | ||
>set VIRTUAL_ENV=c:\path\to\venv | ||
>set PATH=c:\path\to\venv\bin;%PATH% | ||
>set PYTHONHOME= | ||
|
||
See https://docs.python.org/3/library/venv.html for more details. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters