Different test for Unix -- rely on os.sep instead of sys.platform.

This commit is contained in:
Guido van Rossum 1997-09-03 23:12:18 +00:00
parent 2b3fd76cc7
commit dc5d07d952
1 changed files with 3 additions and 3 deletions

View File

@ -95,14 +95,14 @@ def addpackage(sitedir, name):
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)