diff options
author | PJ Eby <distutils-sig@python.org> | 2006-04-21 17:08:23 +0000 |
---|---|---|
committer | PJ Eby <distutils-sig@python.org> | 2006-04-21 17:08:23 +0000 |
commit | bfff594d486ab12b76b9957776227a18b4abc6c5 (patch) | |
tree | 5c6417b4f92796aa9292850f19ad49fd58056ce6 /setuptools/package_index.py | |
parent | f471fd20e76f794f04c69beca6095b98804bb971 (diff) | |
download | external_python_setuptools-bfff594d486ab12b76b9957776227a18b4abc6c5.tar.gz external_python_setuptools-bfff594d486ab12b76b9957776227a18b4abc6c5.tar.bz2 external_python_setuptools-bfff594d486ab12b76b9957776227a18b4abc6c5.zip |
Ignore bdist_dumb distributions when looking at download URLs
--HG--
branch : setuptools-0.6
extra : convert_revision : svn%3A6015fed2-1504-0410-9fe1-9d1591cc4771/sandbox/branches/setuptools-0.6%4045627
Diffstat (limited to 'setuptools/package_index.py')
-rwxr-xr-x | setuptools/package_index.py | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/setuptools/package_index.py b/setuptools/package_index.py index 054220ba..e0db7273 100755 --- a/setuptools/package_index.py +++ b/setuptools/package_index.py @@ -96,7 +96,6 @@ def interpret_distro_name(location, basename, metadata, ``pkg_resources.normalize_path()`` on it before passing it to this routine! """ - # 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. @@ -110,6 +109,11 @@ def interpret_distro_name(location, basename, metadata, # 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:]), @@ -117,10 +121,6 @@ def interpret_distro_name(location, basename, metadata, platform = platform ) - - - - class PackageIndex(Environment): """A distribution index that scans web pages for download URLs""" @@ -534,6 +534,8 @@ class PackageIndex(Environment): def retry_sf_download(self, url, filename): try: return self._download_to(url, filename) + except (KeyboardInterrupt,SystemExit): + raise except: scheme, server, path, param, query, frag = urlparse.urlparse(url) if server!='dl.sourceforge.net': @@ -570,8 +572,6 @@ class PackageIndex(Environment): - - def open_url(self, url): try: return urllib2.urlopen(url) |