]> git.ipfire.org Git - thirdparty/Python/cpython.git/commit
bpo-45413: Define "posix_venv", "nt_venv" and "venv" sysconfig installation schemes...
authorMiro Hrončok <miro@hroncok.cz>
Fri, 18 Mar 2022 09:53:29 +0000 (10:53 +0100)
committerGitHub <noreply@github.com>
Fri, 18 Mar 2022 09:53:29 +0000 (10:53 +0100)
commit48d926269963cfe7a49c0a4f34af4fe9b832399b
treed3fc5c6c1e6b8db9f95eb0fa1987c2738985f654
parentcd44afc573e2e2de8d7e5a9119c347373066cd10
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*.
Doc/library/sysconfig.rst
Doc/library/venv.rst
Doc/whatsnew/3.11.rst
Lib/sysconfig.py
Lib/test/test_sysconfig.py
Lib/test/test_venv.py
Lib/venv/__init__.py
Misc/NEWS.d/next/Library/2022-01-31-15-19-38.bpo-45413.1vaS0V.rst [new file with mode: 0644]