diff options
author | Jason R. Coombs <jaraco@jaraco.com> | 2016-05-06 09:25:01 -0400 |
---|---|---|
committer | Jason R. Coombs <jaraco@jaraco.com> | 2016-05-06 09:25:01 -0400 |
commit | 4a40d24d412c5198d6beee2855accd0f720dd2df (patch) | |
tree | d78552919af3174a2fdeaddaa85baa54cabe0f23 | |
parent | 39ec5541c284c50ebd6ab5bcb6b9c641741201ba (diff) | |
download | python-setuptools-git-4a40d24d412c5198d6beee2855accd0f720dd2df.tar.gz |
Re-use pypa.io for loading metadata as well. Fixes #568.
-rw-r--r-- | ez_setup.py | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/ez_setup.py b/ez_setup.py index a4a4f682..fc22046b 100644 --- a/ez_setup.py +++ b/ez_setup.py @@ -25,8 +25,10 @@ from distutils import log try: from urllib.request import urlopen + from urllib.parse import urljoin except ImportError: from urllib2 import urlopen + from urlparse import urljoin try: from site import USER_SITE @@ -351,7 +353,8 @@ def _resolve_version(version): if version is not LATEST: return version - resp = urlopen('https://pypi.python.org/pypi/setuptools/json') + meta_url = urljoin(DEFAULT_URL, '/pypi/setuptools/json') + resp = urlopen(meta_url) with contextlib.closing(resp): try: charset = resp.info().get_content_charset() |