summaryrefslogtreecommitdiffstats
path: root/Lib/site.py
diff options
context:
space:
mode:
authorNed Deily <nad@python.org>2016-12-03 07:14:09 (GMT)
committerNed Deily <nad@python.org>2016-12-03 07:14:09 (GMT)
commit32b37348661b73b1dd6e061ef56679039222f31b (patch)
tree7f5250d46a68c5a8f580ccdd32114cf13db7ad62 /Lib/site.py
parent7653c3806c8a19a8e3e86c21d8679008a6a15afa (diff)
downloadcpython-32b37348661b73b1dd6e061ef56679039222f31b.zip
cpython-32b37348661b73b1dd6e061ef56679039222f31b.tar.gz
cpython-32b37348661b73b1dd6e061ef56679039222f31b.tar.bz2
Issue #28440: No longer add /Library/Python/site-packages, the Apple-supplied
system Python site-packages directory, to sys.path for macOS framework builds. The coupling between the two Python instances often caused confusion and, as of macOS 10.12, changes to the site-packages layout can cause pip component installations to fail. This change reverts the effects introduced in 2.7.0 by Issue #4865. If you are using a package with both the Apple system Python 2.7 and a user-installed Python 2.7, you will need to ensure that copies of the package are installed with both Python instances.
Diffstat (limited to 'Lib/site.py')
-rw-r--r--Lib/site.py9
1 files changed, 0 insertions, 9 deletions
diff --git a/Lib/site.py b/Lib/site.py
index 4a09f3c..3b51e81 100644
--- a/Lib/site.py
+++ b/Lib/site.py
@@ -295,15 +295,6 @@ def getsitepackages():
else:
sitepackages.append(prefix)
sitepackages.append(os.path.join(prefix, "lib", "site-packages"))
- if sys.platform == "darwin":
- # for framework builds *only* we add the standard Apple
- # locations.
- from sysconfig import get_config_var
- framework = get_config_var("PYTHONFRAMEWORK")
- if framework:
- sitepackages.append(
- os.path.join("/Library", framework,
- sys.version[:3], "site-packages"))
return sitepackages
def addsitepackages(known_paths):