forked from python/cpython
-
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.
bpo-45413: Define "posix_venv", "nt_venv" and "venv" sysconfig instal…
…lation schemes (pythonGH-31034) Define *posix_venv* and *nt_venv* sysconfig installation schemes to be used for bootstrapping new virtual environments. Add *venv* sysconfig installation scheme to get the appropriate one of the above. The schemes are identical to the pre-existing *posix_prefix* and *nt* install schemes. The venv module now uses the *venv* scheme to create new virtual environments instead of hardcoding the paths depending only on the platform. Downstream Python distributors customizing the *posix_prefix* or *nt* install scheme in a way that is not compatible with the install scheme used in virtual environments are encouraged not to customize the *venv* schemes. When Python itself runs in a virtual environment, sysconfig.get_default_scheme and sysconfig.get_preferred_scheme with `key="prefix"` returns *venv*.
- Loading branch information
Showing
8 changed files
with
211 additions
and
16 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
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
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
15 changes: 15 additions & 0 deletions
15
Misc/NEWS.d/next/Library/2022-01-31-15-19-38.bpo-45413.1vaS0V.rst
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,15 @@ | ||
Define *posix_venv* and *nt_venv* | ||
:ref:`sysconfig installation schemes <installation_paths>` | ||
to be used for bootstrapping new virtual environments. | ||
Add *venv* sysconfig installation scheme to get the appropriate one of the above. | ||
The schemes are identical to the pre-existing | ||
*posix_prefix* and *nt* install schemes. | ||
The :mod:`venv` module now uses the *venv* scheme to create new virtual environments | ||
instead of hardcoding the paths depending only on the platform. Downstream | ||
Python distributors customizing the *posix_prefix* or *nt* install | ||
scheme in a way that is not compatible with the install scheme used in | ||
virtual environments are encouraged not to customize the *venv* schemes. | ||
When Python itself runs in a virtual environment, | ||
:func:`sysconfig.get_default_scheme` and | ||
:func:`sysconfig.get_preferred_scheme` with ``key="prefix"`` returns | ||
*venv*. |