Changeset 383 for python/trunk/Modules


Ignore:
Timestamp:
Mar 13, 2014, 9:58:41 PM (11 years ago)
Author:
dmik
Message:

Restore original dynamic 'sys.prefix' detection.

This in particular reverts r20 and parts of r10. These hacks are not
necessary after properly defining 'sys.path' entries in 'site.py'.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • python/trunk/Modules/getpath.c

    r20 r383  
    117117#endif
    118118
    119 #ifndef __EMX__
    120119#ifndef PYTHONPATH
    121120#define PYTHONPATH PREFIX "/lib/python" VERSION ":" \
    122121              EXEC_PREFIX "/lib/python" VERSION "/lib-dynload"
    123 #endif
    124 #else
    125 //#define PYTHONPATH    "./Lib;./Lib/plat-" PLATFORM \
    126 //                      ";./Lib/lib-dynload;./Lib/site-packages"
    127 // force unixroot
    128 #define PYTHONPATH PREFIX "/lib/python" VERSION ":" \
    129               EXEC_PREFIX "/lib/python" VERSION "/lib-" PLATFORM ":" \
    130               EXEC_PREFIX "/lib/python" VERSION "/site-packages" ":" \
    131               EXEC_PREFIX "/lib/python" VERSION "/lib-dynload" ":" \
    132 /* now local (for building) */ \
    133               "./lib" ":" \
    134               "./lib/plat-" PLATFORM ":" \
    135               "./lib/site-packages" ":" \
    136               "./lib/lib-dynload"
    137122#endif
    138123
     
    660645     * return the compiled-in defaults instead.
    661646     */
    662 #ifndef __KLIBC__ // YD force hardcoded build prefix
    663647    if (pfound > 0) {
    664648        reduce(prefix);
     
    670654    }
    671655    else
    672 #endif
    673656        strncpy(prefix, PREFIX, MAXPATHLEN);
    674657
    675 #ifndef __KLIBC__ // YD force hardcoded build exec_prefix
    676658    if (efound > 0) {
    677659        reduce(exec_prefix);
     
    682664    }
    683665    else
    684 #endif
    685666        strncpy(exec_prefix, EXEC_PREFIX, MAXPATHLEN);
    686667}
Note: See TracChangeset for help on using the changeset viewer.