[Python-checkins] r45627 - sandbox/branches/setuptools-0.6/setuptools/package_index.py
phillip.eby
python-checkins at python.org
Fri Apr 21 19:08:24 CEST 2006
Author: phillip.eby
Date: Fri Apr 21 19:08:23 2006
New Revision: 45627
Modified:
sandbox/branches/setuptools-0.6/setuptools/package_index.py
Log:
Ignore bdist_dumb distributions when looking at download URLs
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 Fri Apr 21 19:08:23 2006
@@ -96,7 +96,6 @@
``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 @@
# 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 @@
platform = platform
)
-
-
-
-
class PackageIndex(Environment):
"""A distribution index that scans web pages for download URLs"""
@@ -534,6 +534,8 @@
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 @@
-
-
def open_url(self, url):
try:
return urllib2.urlopen(url)
More information about the Python-checkins
mailing list