[Python-checkins] r50581 - in sandbox/branches/setuptools-0.6: EasyInstall.txt setuptools/package_index.py
phillip.eby
python-checkins at python.org
Tue Jul 11 20:26:54 CEST 2006
Author: phillip.eby
Date: Tue Jul 11 20:26:54 2006
New Revision: 50581
Modified:
sandbox/branches/setuptools-0.6/EasyInstall.txt
sandbox/branches/setuptools-0.6/setuptools/package_index.py
Log:
Suppressed warning message about possibly-misspelled project name, if an egg
or link for that project name has already been seen.
(backport from trunk)
Modified: sandbox/branches/setuptools-0.6/EasyInstall.txt
==============================================================================
--- sandbox/branches/setuptools-0.6/EasyInstall.txt (original)
+++ sandbox/branches/setuptools-0.6/EasyInstall.txt Tue Jul 11 20:26:54 2006
@@ -1209,6 +1209,9 @@
``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``.
Modified: sandbox/branches/setuptools-0.6/setuptools/package_index.py
==============================================================================
--- sandbox/branches/setuptools-0.6/setuptools/package_index.py (original)
+++ sandbox/branches/setuptools-0.6/setuptools/package_index.py Tue Jul 11 20:26:54 2006
@@ -308,11 +308,7 @@
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 @@
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 @@
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
More information about the Python-checkins
mailing list