phillip.eby  committed 541cef8

Ignore bdist_dumb distributions when looking at download URLs

  • Participants
  • Parent commits 4ba7ace
  • Branches setuptools-0.6

Comments (0)

Files changed (1)

File setuptools/

     ``pkg_resources.normalize_path()`` on it before passing it to this
     # Generate alternative interpretations of a source distro name
     # Because some packages are ambiguous as to name/versions split
     # e.g. "adns-python-1.1.0", "egenix-mx-commercial", etc.
     # versions in distribution archive names (sdist and bdist).
     parts = basename.split('-')
+    if not py_version:
+        for i,p in enumerate(parts[2:]):
+            if len(p)==5 and p.startswith('py2.'):
+                return # It's a bdist_dumb, not an sdist -- bail out
     for p in range(1,len(parts)+1):
         yield Distribution(
             location, metadata, '-'.join(parts[:p]), '-'.join(parts[p:]),
             platform = platform
 class PackageIndex(Environment):
     """A distribution index that scans web pages for download URLs"""
     def retry_sf_download(self, url, filename):
             return self._download_to(url, filename)
+        except (KeyboardInterrupt,SystemExit):
+            raise
             scheme, server, path, param, query, frag = urlparse.urlparse(url)
             if server!='':
     def open_url(self, url):
             return urllib2.urlopen(url)