Visitar URL original
gh-91985: Ensure in-tree builds override platstdlib_dir in every path calculation by neonene · Pull Request #93641 · python/cpython · GitHub
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
Next Next commit
less lines
  • Loading branch information
neonene committed Jun 15, 2022
commit bf5bc288c992e46beea3722a9584f3fda8d2ddee
9 changes: 3 additions & 6 deletions Lib/test/test_embed.py
Original file line number Diff line number Diff line change
Expand Up @@ -1350,16 +1350,13 @@ def test_init_is_python_build_with_home(self):
config['_is_python_build'] = 1
exedir = os.path.dirname(sys.executable)
with open(os.path.join(exedir, 'pybuilddir.txt'), encoding='utf8') as f:
platstdlib = os.path.normpath(os.path.join(exedir,
f'{f.read()}\n$'.splitlines()[0]))
if MS_WINDOWS:
expected_paths[2] = platstdlib
else:
expected_paths[2] = os.path.normpath(
os.path.join(exedir, f'{f.read()}\n$'.splitlines()[0]))
if not MS_WINDOWS:
# PREFIX (default) is set when running in build directory
prefix = exec_prefix = sys.prefix
# stdlib calculation (/Lib) is not yet supported
expected_paths[0] = self.module_search_paths(prefix=prefix)[0]
expected_paths[2] = platstdlib
config.update(prefix=prefix, base_prefix=prefix,
exec_prefix=exec_prefix, base_exec_prefix=exec_prefix)
self.check_all_configs("test_init_is_python_build", config,
Expand Down