8000 bpo-45211: Remember the stdlib dir during startup. by ericsnowcurrently · Pull Request #28586 · python/cpython · GitHub
[go: up one dir, main page]

Skip to content

bpo-45211: Remember the stdlib dir during startup. #28586

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 4 commits into from
Sep 28, 2021
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
On Windows, ignore calculate.home for stdlib_dir.
  • Loading branch information
ericsnowcurrently committed Sep 27, 2021
commit 1fe1ff7466c8379f296e23126510e601ac90500b
11 changes: 3 additions & 8 deletions PC/getpathp.c
Original file line number Diff line number Diff line change
Expand Up @@ -1016,14 +1016,9 @@ calculate_path(PyCalculatePath *calculate, _PyPathConfig *pathconfig)

done:
if (pathconfig->stdlib_dir == NULL) {
if (calculate->home != NULL) {
pathconfig->stdlib_dir = _PyMem_RawWcsdup(calculate->home);
}
else {
pathconfig->stdlib_dir = _Py_join_relfile(prefix, STDLIB_SUBDIR);
if (pathconfig->stdlib_dir == NULL) {
return _PyStatus_NO_MEMORY();
}
pathconfig->stdlib_dir = _Py_join_relfile(prefix, STDLIB_SUBDIR);
if (pathconfig->stdlib_dir == NULL) {
return _PyStatus_NO_MEMORY();
}
}
if (pathconfig->prefix == NULL) {
Expand Down
0