-
-
Notifications
You must be signed in to change notification settings - Fork 34.1k
DOC: clarify and expand documentation about PYTHONUSERBASE and PYTHONNOUSERSITE #144637
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Open
tacaswell
wants to merge
6
commits into
python:main
Choose a base branch
from
tacaswell:doc/usersite_details
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from all commits
Commits
Show all changes
6 commits
Select commit
Hold shift + click to select a range
75f9dac
DOC: add cross reference to -s option to PYTHONNOUSERSITE env
tacaswell b4773b3
DOC: add note to PYTHONUSERBASE about PYHTONNOUSERSITE
tacaswell 15ff842
DOC: fix details the value of include-system-site-packages
tacaswell 6d4aa9a
DOC: document include-system-site-packages interaction with usersite
tacaswell 1f7db82
DOC: soften language in note
tacaswell 9cde670
DOC: add details of use site-packages to sys_path_init docs
tacaswell File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or 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 hidden or 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 |
|---|---|---|
|
|
@@ -57,15 +57,19 @@ otherwise they are set to the same value as :data:`sys.base_prefix` and | |
| :data:`sys.base_exec_prefix`, respectively. | ||
| This is used by :ref:`sys-path-init-virtual-environments`. | ||
|
|
||
| Finally, the :mod:`site` module is processed and :file:`site-packages` directories | ||
| are added to the module search path. A common way to customize the search path is | ||
| to create :mod:`sitecustomize` or :mod:`usercustomize` modules as described in | ||
| the :mod:`site` module documentation. | ||
| Finally, the :mod:`site` module is processed and :file:`site-packages` | ||
| directories are added to the module search path. The :envvar:`PYTHONUSERBASE` | ||
| environment variable controls where is searched for user site-packages and the | ||
| :envvar:`PYTHONNOUSERSITE` environment variable prevents searching for user | ||
| site-packages all together. A common way to customize the search path is to | ||
| create :mod:`sitecustomize` or :mod:`usercustomize` modules as described in the | ||
| :mod:`site` module documentation. | ||
|
|
||
| .. note:: | ||
|
|
||
| Certain command line options may further affect path calculations. | ||
| See :option:`-E`, :option:`-I`, :option:`-s` and :option:`-S` for further details. | ||
| The command line options :option:`-E`, :option:`-P`, :option:`-I`, | ||
| :option:`-S` and :option:`-s` further affect path calculations, see their | ||
| documentation for details. | ||
|
|
||
| .. versionchanged:: 3.14 | ||
|
|
||
|
|
@@ -96,11 +100,10 @@ Please refer to :mod:`site`'s | |
|
|
||
| .. note:: | ||
|
|
||
| There are other ways how "virtual environments" could be implemented, this | ||
| documentation refers implementations based on the ``pyvenv.cfg`` mechanism, | ||
| such as :mod:`venv`. Most virtual environment implementations follow the | ||
| model set by :mod:`venv`, but there may be exotic implementations that | ||
| diverge from it. | ||
| There are many ways how "virtual environments" could be implemented. | ||
| This documentation refers to implementations based on the ``pyvenv.cfg`` | ||
| mechanism, such as :mod:`venv`, that many virtual environment implementations | ||
| follow. | ||
|
Comment on lines
-99
to
+106
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I honestly don't think this paragraph needs a change. In fact, I think the new version removes some information that I think is helpful to the user. |
||
|
|
||
| _pth files | ||
| ---------- | ||
|
|
||
This file contains hidden or 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 hidden or 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
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think this should be in the paragraph below, together with their respective CLI flags.