davidhalter/jedi — pull request #345 by Ademan (2013-11-22 10:56:26+00:00)
Title: Added support for pth files in site-packages.

This patch adds support for reading .pth files in the site-packages directory, and adds associated tests.

Some packages, rather than ending up in site-packages/foo end up in site-packages/Foo-0.0.1-pyX.X.egg/foo. These files are listed in pth files in site-packages. The code reading the pth files *looks* pretty brittle, but it's actually pretty close to what python actually does in site-packages/site.py

I want to be clear that I don't have in-depth knowledge of jedi, so it's possible I've touched something bad, but this seems pretty straight forward. I should also note that perhaps this support is already present, but I've encountered a bug instead. Either way, this patch fixes my issue (jedi doesn't see a number of packages I have installed in my virtualenv).