diff options
author | Ned Deily <nad@python.org> | 2016-12-03 07:14:09 (GMT) |
---|---|---|
committer | Ned Deily <nad@python.org> | 2016-12-03 07:14:09 (GMT) |
commit | 32b37348661b73b1dd6e061ef56679039222f31b (patch) | |
tree | 7f5250d46a68c5a8f580ccdd32114cf13db7ad62 /Lib/test/test_site.py | |
parent | 7653c3806c8a19a8e3e86c21d8679008a6a15afa (diff) | |
download | cpython-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/test/test_site.py')
-rw-r--r-- | Lib/test/test_site.py | 13 |
1 files changed, 1 insertions, 12 deletions
diff --git a/Lib/test/test_site.py b/Lib/test/test_site.py index 78c4809..d9a9324 100644 --- a/Lib/test/test_site.py +++ b/Lib/test/test_site.py @@ -233,19 +233,8 @@ class HelperFunctionsTests(unittest.TestCase): self.assertEqual(len(dirs), 1) wanted = os.path.join('xoxo', 'Lib', 'site-packages') self.assertEqual(dirs[0], wanted) - elif (sys.platform == "darwin" and - sysconfig.get_config_var("PYTHONFRAMEWORK")): - # OS X framework builds - site.PREFIXES = ['Python.framework'] - dirs = site.getsitepackages() - self.assertEqual(len(dirs), 3) - wanted = os.path.join('/Library', - sysconfig.get_config_var("PYTHONFRAMEWORK"), - sys.version[:3], - 'site-packages') - self.assertEqual(dirs[2], wanted) elif os.sep == '/': - # OS X non-framwework builds, Linux, FreeBSD, etc + # OS X, Linux, FreeBSD, etc self.assertEqual(len(dirs), 2) wanted = os.path.join('xoxo', 'lib', 'python' + sys.version[:3], 'site-packages') |