From: Guido van Rossum Date: Wed, 3 Sep 1997 23:12:18 +0000 (+0000) Subject: Different test for Unix -- rely on os.sep instead of sys.platform. X-Git-Tag: v1.5a4~241 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=dc5d07d952ed06dcd1fda44737e799a7095e9a01;p=python Different test for Unix -- rely on os.sep instead of sys.platform. --- diff --git a/Lib/site.py b/Lib/site.py index 60a2208edc..23934c9c31 100644 --- a/Lib/site.py +++ b/Lib/site.py @@ -95,14 +95,14 @@ if sys.exec_prefix != sys.prefix: prefixes.append(sys.exec_prefix) for prefix in prefixes: if prefix: - if sys.platform[:3] in ('win', 'mac'): - sitedirs = [prefix] - else: + if os.sep == '/': sitedirs = [os.path.join(prefix, "lib", "python" + sys.version[:3], "packages"), os.path.join(prefix, "lib", "site-python")] + else: + sitedirs = [prefix] for sitedir in sitedirs: if os.path.isdir(sitedir): addsitedir(sitedir)