Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Treat .pth injected paths as extras. (#370)
Fixes #302 before: [omerta pex (kwlzn/osxtras)]$ pex --version pex 1.2.3 [omerta pex (kwlzn/osxtras)]$ pex six -o /tmp/six_broke.pex [omerta pex (kwlzn/osxtras)]$ PEX_VERBOSE=9 PEX_PYTHON=/usr/bin/python /tmp/six_broke.pex pex: Detected PEX_PYTHON, re-exec to /usr/bin/python ... Python 2.7.10 (default, Jul 30 2016, 19:40:32) [GCC 4.2.1 Compatible Apple LLVM 8.0.0 (clang-800.0.34)] on darwin Type "help", "copyright", "credits" or "license" for more information. (InteractiveConsole) >>> from six import wraps Traceback (most recent call last): File "<console>", line 1, in <module> ImportError: cannot import name wraps >>> import six; six.__file__ '/System/Library/Frameworks/Python.framework/Versions/2.7/Extras/lib/python/six.pyc' >>> after: [omerta pex (kwlzn/osxtras)]$ tox -e py27-package ... [omerta pex (kwlzn/osxtras)]$ ./dist/pex27 six -o /tmp/six.pex ... [omerta pex (kwlzn/osxtras)]$ PEX_VERBOSE=9 PEX_PYTHON=/usr/bin/python /tmp/six.pex pex: Detected PEX_PYTHON, re-exec to /usr/bin/python ... pex: Found .pth file: /Library/Python/2.7/site-packages/Extras.pth pex: Found site extra: /System/Library/Frameworks/Python.framework/Versions/2.7/Extras/lib/python pex: Found site extra: /System/Library/Frameworks/Python.framework/Versions/2.7/Extras/lib/python/PyObjC ... pex: Tainted path element: /System/Library/Frameworks/Python.framework/Versions/2.7/Extras/lib/python pex: Tainted path element: /System/Library/Frameworks/Python.framework/Versions/2.7/Extras/lib/python/PyObjC ... pex: Scrubbing from site-packages: /System/Library/Frameworks/Python.framework/Versions/2.7/Extras/lib/python pex: Scrubbing from site-packages: /System/Library/Frameworks/Python.framework/Versions/2.7/Extras/lib/python/PyObjC ... Python 2.7.10 (default, Jul 30 2016, 19:40:32) [GCC 4.2.1 Compatible Apple LLVM 8.0.0 (clang-800.0.34)] on darwin Type "help", "copyright", "credits" or "license" for more information. (InteractiveConsole) >>> from six import wraps >>> import six; six.__file__ '/Users/kwilson/.pex/install/six-1.10.0-py2.py3-none-any.whl.a99dfb27e60da3957f6667853b91ea52e173da0a/six-1.10.0-py2.py3-none-any.whl/six.pyc' >>>
- Loading branch information