GH-126985: move pyvenv.cfg detection from site to getpath (#126987)

This commit is contained in:
Filipe Laíns 🇵🇸 2024-11-26 13:46:33 +00:00 committed by GitHub
parent ab237ff81d
commit 2b0e2b2893
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
12 changed files with 176 additions and 155 deletions

View file

@ -1649,14 +1649,14 @@ class InitConfigTests(EmbeddingTestsMixin, unittest.TestCase):
config = {
'base_prefix': sysconfig.get_config_var("prefix"),
'base_exec_prefix': exec_prefix,
'exec_prefix': exec_prefix,
'exec_prefix': tmpdir,
'prefix': tmpdir,
'base_executable': base_executable,
'executable': executable,
'module_search_paths': paths,
}
if MS_WINDOWS:
config['base_prefix'] = pyvenv_home
config['prefix'] = pyvenv_home
config['stdlib_dir'] = os.path.join(pyvenv_home, 'Lib')
config['use_frozen_modules'] = bool(not support.Py_DEBUG)
else: