mirror of
https://github.com/python/cpython.git
synced 2026-01-06 15:32:22 +00:00
PEP 250: Add lib/site-packages to sys.path on Windows; also sys.prefix
to sys.path if os.sep == ':' (Macs?). See PEP 250.
This commit is contained in:
parent
9fe8828cbf
commit
6a479f5488
1 changed files with 1 additions and 3 deletions
|
|
@ -141,10 +141,8 @@ def addpackage(sitedir, name):
|
|||
"python" + sys.version[:3],
|
||||
"site-packages"),
|
||||
os.path.join(prefix, "lib", "site-python")]
|
||||
elif os.sep == ':':
|
||||
sitedirs = [os.path.join(prefix, "lib", "site-packages")]
|
||||
else:
|
||||
sitedirs = [prefix]
|
||||
sitedirs = [prefix, os.path.join(prefix, "lib", "site-packages")]
|
||||
for sitedir in sitedirs:
|
||||
if os.path.isdir(sitedir):
|
||||
addsitedir(sitedir)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue