diff options
author | Miro HronĨok <miro@hroncok.cz> | 2022-03-18 09:53:29 (GMT) |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-03-18 09:53:29 (GMT) |
commit | 48d926269963cfe7a49c0a4f34af4fe9b832399b (patch) | |
tree | d3fc5c6c1e6b8db9f95eb0fa1987c2738985f654 /Doc/library/venv.rst | |
parent | cd44afc573e2e2de8d7e5a9119c347373066cd10 (diff) | |
download | cpython-48d926269963cfe7a49c0a4f34af4fe9b832399b.zip cpython-48d926269963cfe7a49c0a4f34af4fe9b832399b.tar.gz cpython-48d926269963cfe7a49c0a4f34af4fe9b832399b.tar.bz2 |
bpo-45413: Define "posix_venv", "nt_venv" and "venv" sysconfig installation schemes (GH-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*.
Diffstat (limited to 'Doc/library/venv.rst')
-rw-r--r-- | Doc/library/venv.rst | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/Doc/library/venv.rst b/Doc/library/venv.rst index 092781b..b40bd41 100644 --- a/Doc/library/venv.rst +++ b/Doc/library/venv.rst @@ -177,6 +177,11 @@ creation according to their needs, the :class:`EnvBuilder` class. ``clear=True``, contents of the environment directory will be cleared and then all necessary subdirectories will be recreated. + .. versionchanged:: 3.11 + The *venv* + :ref:`sysconfig installation scheme <installation_paths>` + is used to construct the paths of the created directories. + .. method:: create_configuration(context) Creates the ``pyvenv.cfg`` configuration file in the environment. |