Skip to content
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
On Windows expect PyConfig.stdlib_dir to be set for the pyvenv.cfg case.
  • Loading branch information
ericsnowcurrently committed Sep 27, 2021
commit ca5266ed06b50e1002000aa996529fbbe1039639
8 changes: 5 additions & 3 deletions Lib/test/test_embed.py
Original file line number Diff line number Diff line change
Expand Up @@ -1352,14 +1352,12 @@ def test_init_pyvenv_cfg(self):
'base_executable': executable,
'executable': executable,
'module_search_paths': paths,
# The current getpath.c doesn't determine the stdlib dir
# in this case.
'stdlib_dir': None,
}
path_config = {}
if MS_WINDOWS:
config['base_prefix'] = pyvenv_home
config['prefix'] = pyvenv_home
config['stdlib_dir'] = os.path.join(pyvenv_home, 'lib')

ver = sys.version_info
dll = f'python{ver.major}'
Expand All @@ -1368,6 +1366,10 @@ def test_init_pyvenv_cfg(self):
dll += '.DLL'
dll = os.path.join(os.path.dirname(executable), dll)
path_config['python3_dll'] = dll
else:
# The current getpath.c doesn't determine the stdlib dir
# in this case.
config['stdlib_dir'] = None

env = self.copy_paths_by_env(config)
self.check_all_configs("test_init_compat_config", config,
Expand Down