From: Guido van Rossum Date: Wed, 3 Sep 1997 21:41:30 +0000 (+0000) Subject: Give in to Mike Meyer -- add *both* lib/python1.5/packages and X-Git-Tag: v1.5a4~244 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=ad87d3e826439e319b35bb0f4fa1b5a0bac55ed1;p=python 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. --- diff --git a/Lib/site.py b/Lib/site.py index 7c387f1446..60a2208edc 100644 --- a/Lib/site.py +++ b/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