summaryrefslogtreecommitdiffstats
path: root/Lib/distutils/util.py
diff options
context:
space:
mode:
Diffstat (limited to 'Lib/distutils/util.py')
-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 50ad8fe..9a77561 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.maxsize >= 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.maxsize >= 2**32:
+ machine = 'ppc64'
+
return "%s-%s-%s" % (osname, release, machine)
# get_platform ()