Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit ad24d62

Browse files
committed
Issue #17095: Temporarily revert getpath.c change that added the Modules
directory to sys.path when running from a build directory. That has proven to be problematic for several standard library modules with C extension modules whose builds can fail on some platforms.
1 parent 9502487 commit ad24d62

1 file changed

Lines changed: 0 additions & 14 deletions

File tree

Modules/getpath.c

Lines changed: 0 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -734,11 +734,6 @@ calculate_path(void)
734734

735735
bufsz += wcslen(zip_path) + 1;
736736
bufsz += wcslen(exec_prefix) + 1;
737-
/* When running from the build directory, add room for the Modules
738-
* subdirectory too.
739-
*/
740-
if (efound == -1)
741-
bufsz += wcslen(argv0_path) + wcslen(L"Modules") + 2;
742737

743738
buf = (wchar_t *)PyMem_Malloc(bufsz * sizeof(wchar_t));
744739
if (buf == NULL) {
@@ -786,15 +781,6 @@ calculate_path(void)
786781

787782
/* Finally, on goes the directory for dynamic-load modules */
788783
wcscat(buf, exec_prefix);
789-
/* And, if we run from a build directory, the Modules directory (for
790-
* modules built with Modules/Setup.)
791-
*/
792-
if (efound == -1) {
793-
wcscat(buf, delimiter);
794-
wcscat(buf, argv0_path);
795-
wcscat(buf, separator);
796-
wcscat(buf, L"Modules");
797-
}
798784

799785
/* And publish the results */
800786
module_search_path = buf;

0 commit comments

Comments
 (0)