I need to construct a list of modules that are provided by a list of Python distributions specified in a requirements.txt file. The distributions will first be installed so they should be available for inspection locally.
It looks like I should be able to use pip.req.parse_requirements to get the list of distributions from the requirements file. From there, how can I find the name of the module(s) that the distributions provide?
You can probably use the built in pkgutil module if your python versions are 2.3+
For example,