mirror of
https://github.com/python/cpython.git
synced 2025-07-22 10:45:22 +00:00
Merged revisions 67982,67988,67990 via svnmerge from
svn+ssh://pythondev@svn.python.org/python/trunk ........ r67982 | benjamin.peterson | 2008-12-28 09:37:31 -0600 (Sun, 28 Dec 2008) | 1 line fix WORD_BIGEDIAN declaration in Universal builds; fixes #4060 and #4728 ........ r67988 | ronald.oussoren | 2008-12-28 13:40:56 -0600 (Sun, 28 Dec 2008) | 1 line Issue4064: architecture string for universal builds on OSX ........ r67990 | ronald.oussoren | 2008-12-28 13:50:40 -0600 (Sun, 28 Dec 2008) | 3 lines Update the fix for issue4064 to deal correctly with all three variants of universal builds that are presented by the configure script. ........
This commit is contained in:
parent
360e98ca31
commit
c39d762783
3 changed files with 48 additions and 6 deletions
|
@ -99,7 +99,11 @@ def get_platform ():
|
|||
if not macver:
|
||||
macver = cfgvars.get('MACOSX_DEPLOYMENT_TARGET')
|
||||
|
||||
if not macver:
|
||||
if 1:
|
||||
# Always calculate the release of the running machine,
|
||||
# needed to determine if we can build fat binaries or not.
|
||||
|
||||
macrelease = macver
|
||||
# Get the system version. Reading this plist is a documented
|
||||
# way to get the system version (see the documentation for
|
||||
# the Gestalt Manager)
|
||||
|
@ -115,16 +119,18 @@ def get_platform ():
|
|||
r'<string>(.*?)</string>', f.read())
|
||||
f.close()
|
||||
if m is not None:
|
||||
macver = '.'.join(m.group(1).split('.')[:2])
|
||||
macrelease = '.'.join(m.group(1).split('.')[:2])
|
||||
# else: fall back to the default behaviour
|
||||
|
||||
if not macver:
|
||||
macver = macrelease
|
||||
|
||||
if macver:
|
||||
from distutils.sysconfig import get_config_vars
|
||||
release = macver
|
||||
osname = "macosx"
|
||||
|
||||
|
||||
if (release + '.') >= '10.4.' and \
|
||||
if (macrelease + '.') >= '10.4.' and \
|
||||
'-arch' in get_config_vars().get('CFLAGS', '').strip():
|
||||
# The universal build will build fat binaries, but not on
|
||||
# systems before 10.4
|
||||
|
@ -133,9 +139,13 @@ def get_platform ():
|
|||
# 'universal' instead of 'fat'.
|
||||
|
||||
machine = 'fat'
|
||||
cflags = get_config_vars().get('CFLAGS')
|
||||
|
||||
if '-arch x86_64' in get_config_vars().get('CFLAGS'):
|
||||
machine = 'universal'
|
||||
if '-arch x86_64' in cflags:
|
||||
if '-arch i386' in cflags:
|
||||
machine = 'universal'
|
||||
else:
|
||||
machine = 'fat64'
|
||||
|
||||
elif machine in ('PowerPC', 'Power_Macintosh'):
|
||||
# Pick a sane name for the PPC architecture.
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue