aboutsummaryrefslogtreecommitdiffstats
path: root/setuptools/package_index.py
diff options
context:
space:
mode:
authorPJ Eby <distutils-sig@python.org>2006-07-11 18:26:54 +0000
committerPJ Eby <distutils-sig@python.org>2006-07-11 18:26:54 +0000
commit95637d99856e04680612f139a57f4b112f491852 (patch)
treeec3c8548440ec7eebeb0da1452058754d9c590f9 /setuptools/package_index.py
parent5a5f3580ca0068453ea4f434e6d2f9f78366c09e (diff)
downloadexternal_python_setuptools-95637d99856e04680612f139a57f4b112f491852.tar.gz
external_python_setuptools-95637d99856e04680612f139a57f4b112f491852.tar.bz2
external_python_setuptools-95637d99856e04680612f139a57f4b112f491852.zip
Suppressed warning message about possibly-misspelled project name, if an egg
or link for that project name has already been seen. (backport from trunk) --HG-- branch : setuptools-0.6 extra : convert_revision : svn%3A6015fed2-1504-0410-9fe1-9d1591cc4771/sandbox/branches/setuptools-0.6%4050581
Diffstat (limited to 'setuptools/package_index.py')
-rwxr-xr-xsetuptools/package_index.py26
1 files changed, 13 insertions, 13 deletions
diff --git a/setuptools/package_index.py b/setuptools/package_index.py
index 5bd08f8a..525f0e73 100755
--- a/setuptools/package_index.py
+++ b/setuptools/package_index.py
@@ -308,11 +308,7 @@ class PackageIndex(Environment):
if not self.package_pages.get(requirement.key):
# We couldn't find the target package, so search the index page too
- self.warn(
- "Couldn't find index page for %r (maybe misspelled?)",
- requirement.unsafe_name
- )
- self.scan_all()
+ self.not_found_in_index(requirement)
for url in list(self.package_pages.get(requirement.key,())):
# scan each page that might be related to the desired package
@@ -326,6 +322,10 @@ class PackageIndex(Environment):
self.debug("%s does not match %s", requirement, dist)
return super(PackageIndex, self).obtain(requirement,installer)
+
+
+
+
def check_md5(self, cs, info, filename, tfp):
if re.match('md5=[0-9a-f]{32}$', info):
self.debug("Validating md5 checksum for %s", filename)
@@ -358,14 +358,14 @@ class PackageIndex(Environment):
map(self.scan_url, self.to_scan)
self.to_scan = None # from now on, go ahead and process immediately
-
-
-
-
-
-
-
-
+ def not_found_in_index(self, requirement):
+ if self[requirement.key]: # we've seen at least one distro
+ meth, msg = self.info, "Couldn't retrieve index page for %r"
+ else: # no distros seen for this name, might be misspelled
+ meth, msg = (self.warn,
+ "Couldn't find index page for %r (maybe misspelled?)")
+ meth(msg, requirement.unsafe_name)
+ self.scan_all()
def download(self, spec, tmpdir):
"""Locate and/or download `spec` to `tmpdir`, returning a local path