Commits

Anonymous committed e6f72a7

Suppressed warning message about possibly-misspelled project name, if an egg
or link for that project name has already been seen.
(backport from trunk)

  • Participants
  • Parent commits 7c36061
  • Branches setuptools-0.6

Comments (0)

Files changed (2)

File EasyInstall.txt

    ``rel="homepage"`` or ``rel="download"``, without needing the old
    PyPI-specific visible markup.
 
+ * Suppressed warning message about possibly-misspelled project name, if an egg
+   or link for that project name has already been seen.
+
 0.6b3
  * Fix local ``--find-links`` eggs not being copied except with
    ``--always-copy``.

File setuptools/package_index.py

 
         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
             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)
             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