twitter/commons — pull request #146 by wickman (2013-06-11 16:57:44+00:00)
Title: Do a better job scrubbing PYTHONPATH.

With the latest Apple install of Python we've seen a backwards-incompatible distribute version (somewhere after 0.6.36.) The newest version computes the zipfile manifests inside pkg_resources rather than delegating the task to the zipimport module inside the .pex file, which breaks any zipsafe .eggs included in the .deps directory. Distribute has since been merged into the setuptools mainline, so as part of the effort to move back to setuptools 0.7.x, we'll have to find a way to reconcile this, perhaps leveraging importlib directly. But in the meantime, we can just do a better job of scrubbing out pkg_resources from rogue distribute eggs in the Extras path.