aboutsummaryrefslogtreecommitdiffstats
path: root/setuptools/command
diff options
context:
space:
mode:
authorguyroz <none@none>2011-09-17 16:27:04 +0300
committerguyroz <none@none>2011-09-17 16:27:04 +0300
commitdff9e6b6bc0bd04180d00df52eb74340fa3df580 (patch)
tree9fe5642ba1bcab69f5304be4d06eab4f2bfd4ad7 /setuptools/command
parent793092ce4a71e3c2ac8f5ea2bf30144f7104a4ad (diff)
downloadexternal_python_setuptools-dff9e6b6bc0bd04180d00df52eb74340fa3df580.tar.gz
external_python_setuptools-dff9e6b6bc0bd04180d00df52eb74340fa3df580.tar.bz2
external_python_setuptools-dff9e6b6bc0bd04180d00df52eb74340fa3df580.zip
Issue #238: using 65bit wrappers on Python64bit on windows
--HG-- branch : distribute extra : rebase_source : c0f80f1633017229ec77f4cc1d7c56e86aba3a84
Diffstat (limited to 'setuptools/command')
-rwxr-xr-xsetuptools/command/easy_install.py9
1 files changed, 8 insertions, 1 deletions
diff --git a/setuptools/command/easy_install.py b/setuptools/command/easy_install.py
index 853753c1..4700fe0e 100755
--- a/setuptools/command/easy_install.py
+++ b/setuptools/command/easy_install.py
@@ -42,6 +42,10 @@ __all__ = [
import site
HAS_USER_SITE = not sys.version < "2.6" and site.ENABLE_USER_SITE
+import struct
+def is_64bit():
+ return struct.calcsize("P") == 8
+
def samefile(p1,p2):
if hasattr(os.path,'samefile') and (
os.path.exists(p1) and os.path.exists(p2)
@@ -1781,7 +1785,10 @@ def get_script_args(dist, executable=sys_executable, wininst=False):
ext, launcher = '-script.py', 'cli.exe'
old = ['.py','.pyc','.pyo']
new_header = re.sub('(?i)pythonw.exe','python.exe',header)
-
+ if is_64bit():
+ launcher = launcher.replace(".", "-64.")
+ else:
+ launcher = launcher.replace(".", "-32.")
if os.path.exists(new_header[2:-1]) or sys.platform!='win32':
hdr = new_header
else: