summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRonald Oussoren <ronaldoussoren@mac.com>2009-12-24 13:07:53 (GMT)
committerRonald Oussoren <ronaldoussoren@mac.com>2009-12-24 13:07:53 (GMT)
commit175dc9dc44969a8e7c725a71c1703c0aefd06887 (patch)
treeeaef1dbbe31dbea1decdd842db9397be9f32e1ac
parent0273c84bf092fa84902a70e5967d8bb97284474a (diff)
downloadcpython-175dc9dc44969a8e7c725a71c1703c0aefd06887.zip
cpython-175dc9dc44969a8e7c725a71c1703c0aefd06887.tar.gz
cpython-175dc9dc44969a8e7c725a71c1703c0aefd06887.tar.bz2
Merged revisions 77026 via svnmerge from
svn+ssh://pythondev@svn.python.org/python/trunk ........ r77026 | ronald.oussoren | 2009-12-24 14:06:39 +0100 (Thu, 24 Dec 2009) | 8 lines On OSX the output of "uname -m" always reflects the 32-bit architecture for the machine ("i386" or "ppc"), even if the executable is 64-bit. This patchs ensures that the distutils platform architecture represents the architecture for the executable when running a 64-bit only executable on OSX. ........
-rw-r--r--Lib/distutils/util.py10
1 files changed, 10 insertions, 0 deletions
diff --git a/Lib/distutils/util.py b/Lib/distutils/util.py
index 7bc52f1..d314961 100644
--- a/Lib/distutils/util.py
+++ b/Lib/distutils/util.py
@@ -162,11 +162,21 @@ def get_platform ():
raise ValueError(
"Don't know machine value for archs=%r"%(archs,))
+ elif machine == 'i386':
+ # On OSX the machine type returned by uname is always the
+ # 32-bit variant, even if the executable architecture is
+ # the 64-bit variant
+ if sys.maxint >= 2**32:
+ machine = 'x86_64'
elif machine in ('PowerPC', 'Power_Macintosh'):
# Pick a sane name for the PPC architecture.
machine = 'ppc'
+ # See 'i386' case
+ if sys.maxint >= 2**32:
+ machine = 'ppc64'
+
return "%s-%s-%s" % (osname, release, machine)
# get_platform ()