mirror of
https://github.com/python/cpython.git
synced 2025-07-29 06:05:00 +00:00
Fix issue #4865: add /Library/Python/2.7/site-packages to
sys.path on OSX, to make it easier to share (some) installed packages between the system install and a user install.
This commit is contained in:
parent
6c2633e919
commit
e0154ed7ff
2 changed files with 8 additions and 4 deletions
|
@ -275,13 +275,15 @@ def addsitepackages(known_paths):
|
|||
|
||||
if sys.platform == "darwin":
|
||||
# for framework builds *only* we add the standard Apple
|
||||
# locations. Currently only per-user, but /Library and
|
||||
# /Network/Library could be added too
|
||||
# locations.
|
||||
if 'Python.framework' in prefix:
|
||||
sitedirs.append(
|
||||
os.path.expanduser(
|
||||
os.path.join("~", "Library", "Python",
|
||||
sys.version[:3], "site-packages")))
|
||||
sitedirs.append(
|
||||
os.path.join("/Library", "Python",
|
||||
sys.version[:3], "site-packages"))
|
||||
|
||||
for sitedir in sitedirs:
|
||||
if os.path.isdir(sitedir):
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue