aboutsummaryrefslogtreecommitdiffstats
path: root/setuptools/package_index.py
diff options
context:
space:
mode:
authorPJ Eby <distutils-sig@python.org>2005-08-14 01:45:38 +0000
committerPJ Eby <distutils-sig@python.org>2005-08-14 01:45:38 +0000
commit15233b3d39a81fb7164465f65b182eee65983b56 (patch)
tree83e46285d0fadf68ee4aa8e7fc46efb27d6e85c0 /setuptools/package_index.py
parent8672fe00fe29ded78363f55a358c168774c7d9b4 (diff)
downloadexternal_python_setuptools-15233b3d39a81fb7164465f65b182eee65983b56.tar.gz
external_python_setuptools-15233b3d39a81fb7164465f65b182eee65983b56.tar.bz2
external_python_setuptools-15233b3d39a81fb7164465f65b182eee65983b56.zip
Document the "Environment" class, and simplify its API.
--HG-- branch : setuptools extra : convert_revision : svn%3A6015fed2-1504-0410-9fe1-9d1591cc4771/sandbox/trunk/setuptools%4041194
Diffstat (limited to 'setuptools/package_index.py')
-rwxr-xr-xsetuptools/package_index.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/setuptools/package_index.py b/setuptools/package_index.py
index f2731a1e..95b57178 100755
--- a/setuptools/package_index.py
+++ b/setuptools/package_index.py
@@ -264,7 +264,7 @@ class PackageIndex(Environment):
def obtain(self, requirement, installer=None):
self.find_packages(requirement)
- for dist in self.get(requirement.key, ()):
+ for dist in self[requirement.key]:
if dist in requirement:
return dist
self.debug("%s does not match %s", requirement, dist)
@@ -344,7 +344,7 @@ class PackageIndex(Environment):
self.info("Searching for %s", requirement)
def find(req):
- for dist in self.get(req.key, ()):
+ for dist in self[req.key]:
if dist in req and (dist.precedence<=SOURCE_DIST or not source):
self.info("Best match: %s", dist)
return self.download(dist.location, tmpdir)