summaryrefslogtreecommitdiffstats
path: root/Lib/distutils
diff options
context:
space:
mode:
authorNed Deily <nad@acm.org>2014-06-25 20:42:22 (GMT)
committerNed Deily <nad@acm.org>2014-06-25 20:42:22 (GMT)
commitce38f24af849694fe906b551184632717bf9ccf0 (patch)
tree4838379e900982e587ae317ebefcf312c4ae562d /Lib/distutils
parent893df48682512382fd327045eb9a08fdc610b95e (diff)
parent04cdfa1147d5aadbee190b3aa2c4ccfd2d4a122d (diff)
downloadcpython-ce38f24af849694fe906b551184632717bf9ccf0.zip
cpython-ce38f24af849694fe906b551184632717bf9ccf0.tar.gz
cpython-ce38f24af849694fe906b551184632717bf9ccf0.tar.bz2
Issue #21811: Anticipated fixes to 3.x and 2.7 for OS X 10.10 Yosemite.
Diffstat (limited to 'Lib/distutils')
-rw-r--r--Lib/distutils/tests/test_build_ext.py12
1 files changed, 10 insertions, 2 deletions
diff --git a/Lib/distutils/tests/test_build_ext.py b/Lib/distutils/tests/test_build_ext.py
index 9853abd..e995866 100644
--- a/Lib/distutils/tests/test_build_ext.py
+++ b/Lib/distutils/tests/test_build_ext.py
@@ -444,8 +444,16 @@ class BuildExtTestCase(TempdirManager,
# get the deployment target that the interpreter was built with
target = sysconfig.get_config_var('MACOSX_DEPLOYMENT_TARGET')
- target = tuple(map(int, target.split('.')))
- target = '%02d%01d0' % target
+ target = tuple(map(int, target.split('.')[0:2]))
+ # format the target value as defined in the Apple
+ # Availability Macros. We can't use the macro names since
+ # at least one value we test with will not exist yet.
+ if target[1] < 10:
+ # for 10.1 through 10.9.x -> "10n0"
+ target = '%02d%01d0' % target
+ else:
+ # for 10.10 and beyond -> "10nn00"
+ target = '%02d%02d00' % target
deptarget_ext = Extension(
'deptarget',
[deptarget_c],