[Python-checkins] r67990 - in python/trunk: Doc/distutils/apiref.rst Lib/distutils/util.py

ronald.oussoren python-checkins at python.org
Sun Dec 28 20:50:41 CET 2008


Author: ronald.oussoren
Date: Sun Dec 28 20:50:40 2008
New Revision: 67990

Log:
Update the fix for issue4064 to deal correctly with all three variants of
universal builds that are presented by the configure script.


Modified:
   python/trunk/Doc/distutils/apiref.rst
   python/trunk/Lib/distutils/util.py

Modified: python/trunk/Doc/distutils/apiref.rst
==============================================================================
--- python/trunk/Doc/distutils/apiref.rst	(original)
+++ python/trunk/Doc/distutils/apiref.rst	Sun Dec 28 20:50:40 2008
@@ -1107,6 +1107,7 @@
    For universal binary builds on MacOS X the architecture value reflects
    the univeral binary status instead of the architecture of the current
    processor. For 32-bit universal binaries the architecture is ``fat``, 
+   for 64-bit universal binaries the architecture is ``fat64``, and 
    for 4-way universal binaries the architecture is ``universal``. 
 
    Examples of returned values on MacOS X:

Modified: python/trunk/Lib/distutils/util.py
==============================================================================
--- python/trunk/Lib/distutils/util.py	(original)
+++ python/trunk/Lib/distutils/util.py	Sun Dec 28 20:50:40 2008
@@ -140,9 +140,13 @@
                 # '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.


More information about the Python-checkins mailing list