diff options
-rw-r--r-- | Doc/distutils/apiref.rst | 1 | ||||
-rw-r--r-- | Lib/distutils/util.py | 8 |
2 files changed, 7 insertions, 2 deletions
diff --git a/Doc/distutils/apiref.rst b/Doc/distutils/apiref.rst index a932fbd..65f175f 100644 --- a/Doc/distutils/apiref.rst +++ b/Doc/distutils/apiref.rst @@ -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: diff --git a/Lib/distutils/util.py b/Lib/distutils/util.py index 48cc17f..e9d29ff 100644 --- a/Lib/distutils/util.py +++ b/Lib/distutils/util.py @@ -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. |