- Timestamp:
- Mar 13, 2014, 9:58:41 PM (11 years ago)
- Location:
- python/trunk
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
python/trunk/Lib/site.py
r58 r383 263 263 seen.append(prefix) 264 264 265 if sys.platform in ('os2emx', ' os2knix', 'riscos'):265 if sys.platform in ('os2emx', 'riscos'): 266 266 sitedirs.append(os.path.join(prefix, "Lib", "site-packages")) 267 elif sys.platform == 'os2knix': 268 sitedirs.append(os.path.join(prefix, "lib", 269 "python" + sys.version[:3], 270 "site-packages")) 271 sitedirs.append(os.path.join(prefix, "lib", "site-packages")) 267 272 elif os.sep == '/': 268 273 sitedirs.append(os.path.join(prefix, "lib", … … 488 493 abs__file__() 489 494 known_paths = removeduppaths() 490 if ( os.name == "posix" and sys.pathand491 os.path.basename(sys.path[-1]) == "Modules"):495 if ((os.name == "posix" or os.name == "os2") and 496 sys.path and os.path.basename(sys.path[-1]) == "Modules"): 492 497 addbuilddir() 498 if (os.name == "os2"): 499 setBEGINLIBPATH() 493 500 if ENABLE_USER_SITE is None: 494 501 ENABLE_USER_SITE = check_enableusersite() 495 502 known_paths = addusersitepackages(known_paths) 496 503 known_paths = addsitepackages(known_paths) 497 if sys.platform == 'os2emx' or sys.platform == 'os2knix':498 if (sys.path and os.path.basename(sys.path[-1]) == "Modules"):499 addbuilddir()500 setBEGINLIBPATH()501 504 setquit() 502 505 setcopyright() -
python/trunk/Modules/getpath.c
r20 r383 117 117 #endif 118 118 119 #ifndef __EMX__120 119 #ifndef PYTHONPATH 121 120 #define PYTHONPATH PREFIX "/lib/python" VERSION ":" \ 122 121 EXEC_PREFIX "/lib/python" VERSION "/lib-dynload" 123 #endif124 #else125 //#define PYTHONPATH "./Lib;./Lib/plat-" PLATFORM \126 // ";./Lib/lib-dynload;./Lib/site-packages"127 // force unixroot128 #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"137 122 #endif 138 123 … … 660 645 * return the compiled-in defaults instead. 661 646 */ 662 #ifndef __KLIBC__ // YD force hardcoded build prefix663 647 if (pfound > 0) { 664 648 reduce(prefix); … … 670 654 } 671 655 else 672 #endif673 656 strncpy(prefix, PREFIX, MAXPATHLEN); 674 657 675 #ifndef __KLIBC__ // YD force hardcoded build exec_prefix676 658 if (efound > 0) { 677 659 reduce(exec_prefix); … … 682 664 } 683 665 else 684 #endif685 666 strncpy(exec_prefix, EXEC_PREFIX, MAXPATHLEN); 686 667 }
Note:
See TracChangeset
for help on using the changeset viewer.