]> granicus.if.org Git - python/commitdiff
Issue #17095: Temporarily revert getpath.c change that added the Modules
authorNed Deily <nad@acm.org>
Mon, 15 Sep 2014 02:19:49 +0000 (19:19 -0700)
committerNed Deily <nad@acm.org>
Mon, 15 Sep 2014 02:19:49 +0000 (19:19 -0700)
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.

Modules/getpath.c

index f26b8e9b2b711bb2bfeb2bae8c38686db22bce12..c057737ec2bbd1d96ef53548211fee15197da2ea 100644 (file)
@@ -734,11 +734,6 @@ calculate_path(void)
 
     bufsz += wcslen(zip_path) + 1;
     bufsz += wcslen(exec_prefix) + 1;
-    /* When running from the build directory, add room for the Modules
-     * subdirectory too.
-     */
-    if (efound == -1)
-        bufsz += wcslen(argv0_path) + wcslen(L"Modules") + 2;
 
     buf = (wchar_t *)PyMem_Malloc(bufsz * sizeof(wchar_t));
     if (buf == NULL) {
@@ -786,15 +781,6 @@ calculate_path(void)
 
     /* Finally, on goes the directory for dynamic-load modules */
     wcscat(buf, exec_prefix);
-   /* And, if we run from a build directory, the Modules directory (for
-    * modules built with Modules/Setup.)
-    */
-   if (efound == -1) {
-       wcscat(buf, delimiter);
-       wcscat(buf, argv0_path);
-       wcscat(buf, separator);
-       wcscat(buf, L"Modules");
-   }
 
     /* And publish the results */
     module_search_path = buf;