aboutsummaryrefslogtreecommitdiffstats
path: root/setuptools/package_index.py
diff options
context:
space:
mode:
authoragroszer <none@none>2011-04-15 10:49:49 +0200
committeragroszer <none@none>2011-04-15 10:49:49 +0200
commit1509fe5874ad7155482d71b1b922bfdeb522ab58 (patch)
tree54dfccd2bfd87f6e66088849be9eae5edc242998 /setuptools/package_index.py
parent119e1f717238083a18d973f988114789c5b3e41b (diff)
downloadexternal_python_setuptools-1509fe5874ad7155482d71b1b922bfdeb522ab58.tar.gz
external_python_setuptools-1509fe5874ad7155482d71b1b922bfdeb522ab58.tar.bz2
external_python_setuptools-1509fe5874ad7155482d71b1b922bfdeb522ab58.zip
Fixing #200
--HG-- branch : distribute extra : rebase_source : 4446e76a0bcf2e968abce2020569aecbaab1df01
Diffstat (limited to 'setuptools/package_index.py')
-rwxr-xr-xsetuptools/package_index.py17
1 files changed, 13 insertions, 4 deletions
diff --git a/setuptools/package_index.py b/setuptools/package_index.py
index 459cae2c..6d4047af 100755
--- a/setuptools/package_index.py
+++ b/setuptools/package_index.py
@@ -31,16 +31,25 @@ def parse_bdist_wininst(name):
"""Return (base,pyversion) or (None,None) for possible .exe name"""
lower = name.lower()
- base, py_ver = None, None
+ base, py_ver, plat = None, None, None
if lower.endswith('.exe'):
if lower.endswith('.win32.exe'):
base = name[:-10]
+ plat = 'win32'
elif lower.startswith('.win32-py',-16):
py_ver = name[-7:-4]
base = name[:-16]
+ plat = 'win32'
+ elif lower.endswith('.win-amd64.exe'):
+ base = name[:-14]
+ plat = 'win-amd64'
+ elif lower.startswith('.win-amd64-py',-20):
+ py_ver = name[-7:-4]
+ base = name[:-20]
+ plat = 'win-amd64'
+ return base,py_ver,plat
- return base,py_ver
def egg_info_for_url(url):
scheme, server, path, parameters, query, fragment = urlparse.urlparse(url)
@@ -69,10 +78,10 @@ def distros_for_location(location, basename, metadata=None):
return [Distribution.from_location(location, basename, metadata)]
if basename.endswith('.exe'):
- win_base, py_ver = parse_bdist_wininst(basename)
+ win_base, py_ver, platform = parse_bdist_wininst(basename)
if win_base is not None:
return interpret_distro_name(
- location, win_base, metadata, py_ver, BINARY_DIST, "win32"
+ location, win_base, metadata, py_ver, BINARY_DIST, platform
)
# Try source distro extensions (.zip, .tgz, etc.)