]> granicus.if.org Git - python/commitdiff
Update the fix for issue4064 to deal correctly with all three variants of
authorRonald Oussoren <ronaldoussoren@mac.com>
Sun, 28 Dec 2008 19:50:40 +0000 (19:50 +0000)
committerRonald Oussoren <ronaldoussoren@mac.com>
Sun, 28 Dec 2008 19:50:40 +0000 (19:50 +0000)
universal builds that are presented by the configure script.

Doc/distutils/apiref.rst
Lib/distutils/util.py

index a932fbd387ddff93f3087312ff08b1f975766068..65f175f6bee66cf1d462572dcf86af686c720df8 100644 (file)
@@ -1107,6 +1107,7 @@ other utility module.
    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:
index 48cc17f6248f1aa8d88aa853acfdb0d5c739315b..e9d29ff49c05cd864351baa21d47bf359e280621 100644 (file)
@@ -140,9 +140,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.