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:
Guido van Rossum 1997-09-03 21:41:30 +00:00
parent 9efe8ef7a1
commit ad87d3e826

View file

@ -96,14 +96,16 @@ if sys.exec_prefix != sys.prefix:
for prefix in prefixes: for prefix in prefixes:
if prefix: if prefix:
if sys.platform[:3] in ('win', 'mac'): if sys.platform[:3] in ('win', 'mac'):
sitedir = prefix sitedirs = [prefix]
else: else:
sitedir = os.path.join(prefix, sitedirs = [os.path.join(prefix,
"lib", "lib",
"python" + sys.version[:3], "python" + sys.version[:3],
"packages") "packages"),
if os.path.isdir(sitedir): os.path.join(prefix, "lib", "site-python")]
addsitedir(sitedir) for sitedir in sitedirs:
if os.path.isdir(sitedir):
addsitedir(sitedir)
try: try:
import sitecustomize # Run arbitrary site specific code import sitecustomize # Run arbitrary site specific code