summaryrefslogtreecommitdiffstats
path: root/Doc/c-api
diff options
context:
space:
mode:
authorFilipe Laíns 🇵🇸 <lains@riseup.net>2024-11-26 13:46:33 (GMT)
committerGitHub <noreply@github.com>2024-11-26 13:46:33 (GMT)
commit2b0e2b2893a821ca36cd65a204bed932741ac189 (patch)
treedcae7576064fcb8ec409f38d98b217f5cc815249 /Doc/c-api
parentab237ff81d2201c70aaacf51f0c033df334e5d07 (diff)
downloadcpython-2b0e2b2893a821ca36cd65a204bed932741ac189.zip
cpython-2b0e2b2893a821ca36cd65a204bed932741ac189.tar.gz
cpython-2b0e2b2893a821ca36cd65a204bed932741ac189.tar.bz2
GH-126985: move pyvenv.cfg detection from site to getpath (#126987)
Diffstat (limited to 'Doc/c-api')
-rw-r--r--Doc/c-api/init_config.rst13
1 files changed, 13 insertions, 0 deletions
diff --git a/Doc/c-api/init_config.rst b/Doc/c-api/init_config.rst
index e621545..d6569dd 100644
--- a/Doc/c-api/init_config.rst
+++ b/Doc/c-api/init_config.rst
@@ -1590,9 +1590,22 @@ If a ``._pth`` file is present:
* Set :c:member:`~PyConfig.site_import` to ``0``.
* Set :c:member:`~PyConfig.safe_path` to ``1``.
+If :c:member:`~PyConfig.home` is not set and a ``pyvenv.cfg`` file is present in
+the same directory as :c:member:`~PyConfig.executable`, or its parent,
+:c:member:`~PyConfig.prefix` and :c:member:`~PyConfig.exec_prefix` are set that
+location. When this happens, :c:member:`~PyConfig.base_prefix` and
+:c:member:`~PyConfig.base_exec_prefix` still keep their value, pointing to the
+base installation. See :ref:`sys-path-init-virtual-environments` for more
+information.
+
The ``__PYVENV_LAUNCHER__`` environment variable is used to set
:c:member:`PyConfig.base_executable`.
+.. versionchanged:: 3.14
+
+ :c:member:`~PyConfig.prefix`, and :c:member:`~PyConfig.exec_prefix`, are now
+ set to the ``pyvenv.cfg`` directory. This was previously done by :mod:`site`,
+ therefore affected by :option:`-S`.
.. _pyinitconfig_api: