[Distutils] pakage index __getitem__

Jim Fulton jim at zope.com
Sun Mar 18 00:01:51 CET 2007

I want to get a list of all of the distributions I can find that  
satisfy a requirement.  I've found the following works:

   dists = [d for d in index[requirement.project_name] if d in  

where index is a setuptools.package_index.PackageIndex.

Is there a better way?  The obtain call seems to be necessary to  
initialize the index for the given project.


Jim Fulton			mailto:jim at zope.com		Python Powered!
CTO 				(540) 361-1714			http://www.python.org
Zope Corporation	http://www.zope.com		http://www.zope.org

More information about the Distutils-SIG mailing list