Bug report
Bug description:
$ ./python
Python 3.14.0a2+ experimental free-threading build (heads/main:79b7cab50a3, Dec 7 2024, 19:01:51) [GCC 14.2.1 20240910] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> import venv
>>> builder = venv.EnvBuilder()
>>> context = builder.ensure_directories('venv')
>>> context.inc_path
'venv/include/python3.14td'
$ venv/bin/python
Python 3.14.0a2+ experimental free-threading build (heads/main:79b7cab50a3, Dec 7 2024, 19:01:51) [GCC 14.2.1 20240910] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> import sysconfig
>>> sysconfig.get_path('include')
'/usr/local/include/python3.14td'
I noticed this when looking at the venv code:
|
def _venv_path(self, env_dir, name): |
|
vars = { |
|
'base': env_dir, |
|
'platbase': env_dir, |
|
'installed_base': env_dir, |
|
'installed_platbase': env_dir, |
|
} |
|
return sysconfig.get_path(name, scheme='venv', vars=vars) |
As the name suggests, installed_base and installed_platbase should be pointing to the base installation, not the virtual environment.
Note: The include directory being shared between all environments in a Python installation is a known issue.
CPython versions tested on:
CPython main branch
Operating systems tested on:
No response
Linked PRs
Bug report
Bug description:
I noticed this when looking at the
venvcode:cpython/Lib/venv/__init__.py
Lines 102 to 109 in 79b7cab
As the name suggests,
installed_baseandinstalled_platbaseshould be pointing to the base installation, not the virtual environment.Note: The
includedirectory being shared between all environments in a Python installation is a known issue.CPython versions tested on:
CPython main branch
Operating systems tested on:
No response
Linked PRs