summaryrefslogtreecommitdiffstats
path: root/Doc/library/sysconfig.rst
diff options
context:
space:
mode:
Diffstat (limited to 'Doc/library/sysconfig.rst')
-rw-r--r--Doc/library/sysconfig.rst15
1 files changed, 14 insertions, 1 deletions
diff --git a/Doc/library/sysconfig.rst b/Doc/library/sysconfig.rst
index 713be1e..fa18d62 100644
--- a/Doc/library/sysconfig.rst
+++ b/Doc/library/sysconfig.rst
@@ -73,7 +73,7 @@ Every new component that is installed using :mod:`distutils` or a
Distutils-based system will follow the same scheme to copy its file in the right
places.
-Python currently supports six schemes:
+Python currently supports nine schemes:
- *posix_prefix*: scheme for POSIX platforms like Linux or macOS. This is
the default scheme used when Python or a component is installed.
@@ -83,8 +83,14 @@ Python currently supports six schemes:
- *posix_user*: scheme for POSIX platforms used when a component is installed
through Distutils and the *user* option is used. This scheme defines paths
located under the user home directory.
+- *posix_venv*: scheme for :mod:`Python virtual environments <venv>` on POSIX
+ platforms; by default it is the same as *posix_prefix* .
- *nt*: scheme for NT platforms like Windows.
- *nt_user*: scheme for NT platforms, when the *user* option is used.
+- *nt_venv*: scheme for :mod:`Python virtual environments <venv>` on NT
+ platforms; by default it is the same as *nt* .
+- *venv*: a scheme with values from ether *posix_venv* or *nt_venv* depending
+ on the platform Python runs on
- *osx_framework_user*: scheme for macOS, when the *user* option is used.
Each scheme is itself composed of a series of paths and each path has a unique
@@ -119,6 +125,9 @@ identifier. Python currently uses eight paths:
This function was previously named ``_get_default_scheme()`` and
considered an implementation detail.
+ .. versionchanged:: 3.11
+ When Python runs from a virtual environment,
+ the *venv* scheme is returned.
.. function:: get_preferred_scheme(key)
@@ -132,6 +141,10 @@ identifier. Python currently uses eight paths:
.. versionadded:: 3.10
+ .. versionchanged:: 3.11
+ When Python runs from a virtual environment and ``key="prefix"``,
+ the *venv* scheme is returned.
+
.. function:: _get_preferred_schemes()