mirror of
https://github.com/python/cpython.git
synced 2024-11-24 02:15:30 +08:00
Give in to Mike Meyer -- add *both* lib/python1.5/packages and
lib/site-python to the path (if they exist). This is a reasonable compromise.
This commit is contained in:
parent
9efe8ef7a1
commit
ad87d3e826
16
Lib/site.py
16
Lib/site.py
@ -96,14 +96,16 @@ if sys.exec_prefix != sys.prefix:
|
||||
for prefix in prefixes:
|
||||
if prefix:
|
||||
if sys.platform[:3] in ('win', 'mac'):
|
||||
sitedir = prefix
|
||||
sitedirs = [prefix]
|
||||
else:
|
||||
sitedir = os.path.join(prefix,
|
||||
"lib",
|
||||
"python" + sys.version[:3],
|
||||
"packages")
|
||||
if os.path.isdir(sitedir):
|
||||
addsitedir(sitedir)
|
||||
sitedirs = [os.path.join(prefix,
|
||||
"lib",
|
||||
"python" + sys.version[:3],
|
||||
"packages"),
|
||||
os.path.join(prefix, "lib", "site-python")]
|
||||
for sitedir in sitedirs:
|
||||
if os.path.isdir(sitedir):
|
||||
addsitedir(sitedir)
|
||||
|
||||
try:
|
||||
import sitecustomize # Run arbitrary site specific code
|
||||
|
Loading…
Reference in New Issue
Block a user