Commit 152d8eb8 authored by Ronald Oussoren's avatar Ronald Oussoren

Merged revisions 77028 via svnmerge from

svn+ssh://pythondev@svn.python.org/python/branches/py3k

................
  r77028 | ronald.oussoren | 2009-12-24 14:14:21 +0100 (Thu, 24 Dec 2009) | 15 lines

  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.
  ........
................
parent 0c509da5
...@@ -162,11 +162,21 @@ def get_platform (): ...@@ -162,11 +162,21 @@ def get_platform ():
raise ValueError( raise ValueError(
"Don't know machine value for archs=%r"%(archs,)) "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'): elif machine in ('PowerPC', 'Power_Macintosh'):
# Pick a sane name for the PPC architecture. # Pick a sane name for the PPC architecture.
machine = 'ppc' machine = 'ppc'
# See 'i386' case
if sys.maxsize >= 2**32:
machine = 'ppc64'
return "%s-%s-%s" % (osname, release, machine) return "%s-%s-%s" % (osname, release, machine)
# get_platform () # get_platform ()
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment