aboutsummaryrefslogtreecommitdiffstats
path: root/setuptools/package_index.py
diff options
context:
space:
mode:
Diffstat (limited to 'setuptools/package_index.py')
-rwxr-xr-xsetuptools/package_index.py6
1 files changed, 3 insertions, 3 deletions
diff --git a/setuptools/package_index.py b/setuptools/package_index.py
index 6ef185f0..f2731a1e 100755
--- a/setuptools/package_index.py
+++ b/setuptools/package_index.py
@@ -7,6 +7,8 @@ from distutils.errors import DistutilsError
EGG_FRAGMENT = re.compile('^egg=(\\w+(-\\w+)?)$')
HREF = re.compile("""href\\s*=\\s*['"]?([^'"> ]+)""", re.I)
+# this is here to fix emacs' cruddy broken syntax highlighting: '
+
URL_SCHEME = re.compile('([-+.a-z0-9]{2,}):',re.I).match
EXTENSIONS = ".tar.gz .tar.bz2 .tar .zip .tgz".split()
@@ -37,8 +39,6 @@ def parse_bdist_wininst(name):
-
-
def distros_for_url(url, metadata=None):
"""Yield egg or source distribution objects that might be found at a URL"""
@@ -371,10 +371,10 @@ class PackageIndex(Environment):
def _download_to(self, url, filename):
self.info("Downloading %s", url)
-
# Download the file
fp, tfp = None, None
try:
+ url = url.split('#', 1)[0]
fp = self.open_url(url)
if isinstance(fp, urllib2.HTTPError):
raise DistutilsError(