summaryrefslogtreecommitdiffstats
path: root/Lib/_osx_support.py
diff options
context:
space:
mode:
Diffstat (limited to 'Lib/_osx_support.py')
-rw-r--r--Lib/_osx_support.py12
1 files changed, 10 insertions, 2 deletions
diff --git a/Lib/_osx_support.py b/Lib/_osx_support.py
index b6eac5f..b07e75d 100644
--- a/Lib/_osx_support.py
+++ b/Lib/_osx_support.py
@@ -450,8 +450,16 @@ def get_platform_osx(_config_vars, osname, release, machine):
# case and disallow installs.
cflags = _config_vars.get(_INITPRE+'CFLAGS',
_config_vars.get('CFLAGS', ''))
- if ((macrelease + '.') >= '10.4.' and
- '-arch' in cflags.strip()):
+ if macrelease:
+ try:
+ macrelease = tuple(int(i) for i in macrelease.split('.')[0:2])
+ except ValueError:
+ macrelease = (10, 0)
+ else:
+ # assume no universal support
+ macrelease = (10, 0)
+
+ if (macrelease >= (10, 4)) and '-arch' in cflags.strip():
# The universal build will build fat binaries, but not on
# systems before 10.4