8000 gh-91985: Ensure in-tree builds override platstdlib_dir in every path calculation by neonene · Pull Request #93641 · python/cpython · GitHub
[go: up one dir, main page]

Skip to content

gh-91985: Ensure in-tree builds override platstdlib_dir in every path calculation #93641

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 19 commits into from
Jun 16, 2022
Merged
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
0