Different test for Unix -- rely on os.sep instead of sys.platform.
This commit is contained in:
parent
2b3fd76cc7
commit
dc5d07d952
|
@ -95,14 +95,14 @@ if sys.exec_prefix != sys.prefix:
|
||||||
prefixes.append(sys.exec_prefix)
|
prefixes.append(sys.exec_prefix)
|
||||||
for prefix in prefixes:
|
for prefix in prefixes:
|
||||||
if prefix:
|
if prefix:
|
||||||
if sys.platform[:3] in ('win', 'mac'):
|
if os.sep == '/':
|
||||||
sitedirs = [prefix]
|
|
||||||
else:
|
|
||||||
sitedirs = [os.path.join(prefix,
|
sitedirs = [os.path.join(prefix,
|
||||||
"lib",
|
"lib",
|
||||||
"python" + sys.version[:3],
|
"python" + sys.version[:3],
|
||||||
"packages"),
|
"packages"),
|
||||||
os.path.join(prefix, "lib", "site-python")]
|
os.path.join(prefix, "lib", "site-python")]
|
||||||
|
else:
|
||||||
|
sitedirs = [prefix]
|
||||||
for sitedir in sitedirs:
|
for sitedir in sitedirs:
|
||||||
if os.path.isdir(sitedir):
|
if os.path.isdir(sitedir):
|
||||||
addsitedir(sitedir)
|
addsitedir(sitedir)
|
||||||
|
|
Loading…
Reference in New Issue