diff options
author | Ned Deily <nad@python.org> | 2018-01-30 10:14:09 (GMT) |
---|---|---|
committer | GitHub <noreply@github.com> | 2018-01-30 10:14:09 (GMT) |
commit | 763f094b1f0ce2a07768828e78afe9687e9ad3bb (patch) | |
tree | 76c3a1c1ef107ffd0c0a09ab1f96d786e69539d3 /Lib/test | |
parent | 67adb31a416864f853772c3e74a06caeadc9b6f1 (diff) | |
download | cpython-763f094b1f0ce2a07768828e78afe9687e9ad3bb.zip cpython-763f094b1f0ce2a07768828e78afe9687e9ad3bb.tar.gz cpython-763f094b1f0ce2a07768828e78afe9687e9ad3bb.tar.bz2 |
bpo-28440: Don't add /Library/Python/3.x/site-packages to sys.path (#5445)
No longer add /Library/Python/3.x/site-packages, the Apple-supplied
system Python site-packages directory, to sys.path for macOS framework
builds in case Apple ships a version of Python 3. A similar change
was made earlier to Python 2.7 where it was found that the coupling
between the system Python and a user-installed framework Python often
caused confusion or pip install failures.
Diffstat (limited to 'Lib/test')
-rw-r--r-- | Lib/test/test_site.py | 16 |
1 files changed, 2 insertions, 14 deletions
diff --git a/Lib/test/test_site.py b/Lib/test/test_site.py index 266adf0..b6648d6 100644 --- a/Lib/test/test_site.py +++ b/Lib/test/test_site.py @@ -261,20 +261,8 @@ class HelperFunctionsTests(unittest.TestCase): def test_getsitepackages(self): site.PREFIXES = ['xoxo'] dirs = site.getsitepackages() - - if (sys.platform == "darwin" and - sysconfig.get_config_var("PYTHONFRAMEWORK")): - # OS X framework builds - site.PREFIXES = ['Python.framework'] - dirs = site.getsitepackages() - self.assertEqual(len(dirs), 2) - wanted = os.path.join('/Library', - sysconfig.get_config_var("PYTHONFRAMEWORK"), - '%d.%d' % sys.version_info[:2], - 'site-packages') - self.assertEqual(dirs[1], wanted) - elif os.sep == '/': - # OS X non-framework builds, Linux, FreeBSD, etc + if os.sep == '/': + # OS X, Linux, FreeBSD, etc self.assertEqual(len(dirs), 1) wanted = os.path.join('xoxo', 'lib', 'python%d.%d' % sys.version_info[:2], |