summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPJ Eby <distutils-sig@python.org>2010-02-01 16:42:04 +0000
committerPJ Eby <distutils-sig@python.org>2010-02-01 16:42:04 +0000
commitadd8eb0b8621e81cd09b9008c5b884fffea54b41 (patch)
tree27b1857edf715c66aeef994b269c33d62730e715
parentb462e2ffc5b82017677003d0df39a9d0b32cc974 (diff)
downloadpython-setuptools-bitbucket-add8eb0b8621e81cd09b9008c5b884fffea54b41.tar.gz
Backport SF download fix
-rwxr-xr-xEasyInstall.txt2
-rwxr-xr-xsetuptools/package_index.py4
2 files changed, 4 insertions, 2 deletions
diff --git a/EasyInstall.txt b/EasyInstall.txt
index df11309a..45bdf0c8 100755
--- a/EasyInstall.txt
+++ b/EasyInstall.txt
@@ -1224,6 +1224,8 @@ Release Notes/Change History
* Fixed bogus AttributeError when no local or downloadable packages are
available
+ * Fix for recent Sourceforge downloading changes
+
0.6c11
* Fix installed script .exe files not working with 64-bit Python on Windows
(wasn't actually released in 0.6c10 due to a lost checkin)
diff --git a/setuptools/package_index.py b/setuptools/package_index.py
index 78b07f4b..32498d0f 100755
--- a/setuptools/package_index.py
+++ b/setuptools/package_index.py
@@ -590,9 +590,8 @@ class PackageIndex(Environment):
def _download_url(self, scheme, url, tmpdir):
# Determine download filename
#
- name = filter(None,urlparse.urlparse(url)[2].split('/'))
+ name, fragment = egg_info_for_url(url)
if name:
- name = name[-1]
while '..' in name:
name = name.replace('..','.').replace('\\','_')
else:
@@ -613,6 +612,7 @@ class PackageIndex(Environment):
self.url_ok(url, True) # raises error if not allowed
return self._attempt_download(url, filename)
+
def scan_url(self, url):
self.process_url(url, True)