Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

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
add platstdlib_dir
  • Loading branch information
neonene committed Jun 12, 2022
commit b085759c1c6b632a7192d4dfed546029f3ebcc2d
6 changes: 4 additions & 2 deletions 6 Lib/test/test_getpath.py
Original file line number Diff line number Diff line change
Expand Up @@ -249,7 +249,7 @@ def update_pathconfig(config, attr):
if config[attr] > 0:
_Py_path_config[attr] = config[attr]

for edges in [(0,-1), (-1, 0), (-1,-1), (-10, 0), [-10, 5], [5, -10]]:
for edges in [(0,-1), (-1, 0), (-1,-1), (-10, 0), [-10, 5], [5,-10]]:
_Py_path_config = dict(
_is_python_build=edges[0],
)
Expand All @@ -258,7 +258,7 @@ def update_pathconfig(config, attr):
)
ns.add_known_file(r"C:\CPython\PCbuild\amd64\pybuilddir.txt", [""])
ns['config'].update(
home=r"C:\CPython", # turn on 'home_was_set'
home=r"C:\CPython", # turn on 'home_was_set'
_is_python_build=edges[1],
)
# _PyConfig_InitPathConfig emulation
Expand All @@ -267,12 +267,14 @@ def update_pathconfig(config, attr):
expected = dict(
_is_python_build=ns['config']['_is_python_build'],
build_prefix=None,
platstdlib_dir=r"C:\CPython\DLLs",
)
else:
edges = (1, 1)
expected = dict(
_is_python_build=edges[1],
build_prefix=r"C:\CPython",
platstdlib_dir=r"C:\CPython\PCbuild\amd64",
)
actual = getpath(ns, expected)
self.assertEqual(actual, expected)
Expand Down
Morty Proxy This is a proxified and sanitized view of the page, visit original site.