summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRonald Oussoren <ronaldoussoren@mac.com>2008-12-28 19:42:55 (GMT)
committerRonald Oussoren <ronaldoussoren@mac.com>2008-12-28 19:42:55 (GMT)
commit9bc4ad224a5182908204ab2725beade5852c1cb6 (patch)
tree9df5a75ce66e2727fe9e5682818a3c6feb4843d0
parent989707b24a4310b1e51f50ecb9564fbefe41f6e6 (diff)
downloadcpython-9bc4ad224a5182908204ab2725beade5852c1cb6.zip
cpython-9bc4ad224a5182908204ab2725beade5852c1cb6.tar.gz
cpython-9bc4ad224a5182908204ab2725beade5852c1cb6.tar.bz2
Backport of r67988
-rw-r--r--Lib/distutils/util.py14
1 files changed, 10 insertions, 4 deletions
diff --git a/Lib/distutils/util.py b/Lib/distutils/util.py
index 262a9b8..48cc17f 100644
--- a/Lib/distutils/util.py
+++ b/Lib/distutils/util.py
@@ -100,7 +100,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)
@@ -116,16 +120,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