[Python-checkins] r53542 - in sandbox/branches/setuptools-0.6: EasyInstall.txt setuptools/package_index.py
phillip.eby
python-checkins at python.org
Wed Jan 24 16:42:27 CET 2007
Author: phillip.eby
Date: Wed Jan 24 16:42:26 2007
New Revision: 53542
Modified:
sandbox/branches/setuptools-0.6/EasyInstall.txt
sandbox/branches/setuptools-0.6/setuptools/package_index.py
Log:
EasyInstall no longer aborts the installation process if a URL it wants to
retrieve can't be downloaded, unless the URL is an actual package download.
Instead, it issues a warning and tries to keep going.
(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 Wed Jan 24 16:42:26 2007
@@ -1194,6 +1194,11 @@
Release Notes/Change History
============================
+0.6c6
+ * EasyInstall no longer aborts the installation process if a URL it wants to
+ retrieve can't be downloaded, unless the URL is an actual package download.
+ Instead, it issues a warning and tries to keep going.
+
0.6c5
* Fixed ``.dll`` files on Cygwin not having executable permisions when an egg
is installed unzipped.
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 Wed Jan 24 16:42:26 2007
@@ -166,7 +166,6 @@
"""Evaluate a URL as a possible download, and maybe retrieve it"""
if url in self.scanned_urls and not retrieve:
return
-
self.scanned_urls[url] = True
if not URL_SCHEME(url):
self.process_filename(url)
@@ -187,7 +186,8 @@
return
self.info("Reading %s", url)
- f = self.open_url(url)
+ f = self.open_url(url, "Download error: %s -- Some packages may not be found!")
+ if f is None: return
self.fetched_urls[url] = self.fetched_urls[f.url] = True
if 'html' not in f.headers.get('content-type', '').lower():
@@ -572,7 +572,7 @@
pass # no-op
- def open_url(self, url):
+ def open_url(self, url, warning=None):
if url.startswith('file:'):
return local_open(url)
try:
@@ -580,7 +580,8 @@
except urllib2.HTTPError, v:
return v
except urllib2.URLError, v:
- raise DistutilsError("Download error: %s" % v.reason)
+ if warning: self.warn(warning, v.reason)
+ else: raise DistutilsError("Download error: %s" % v.reason)
def _download_url(self, scheme, url, tmpdir):
# Determine download filename
@@ -612,7 +613,6 @@
self.process_url(url, True)
-
def _attempt_download(self, url, filename):
headers = self._download_to(url, filename)
if 'html' in headers['content-type'].lower():
More information about the Python-checkins
mailing list