diff options
author | Ned Deily <nad@acm.org> | 2014-06-25 13:36:14 -0700 |
---|---|---|
committer | Ned Deily <nad@acm.org> | 2014-06-25 13:36:14 -0700 |
commit | b0613599907ab9d9823f6a79725134d206fdf180 (patch) | |
tree | f857661c94ab2f6592b79373074c8580123dc2ae /Lib/distutils/tests/test_build_ext.py | |
parent | 050d2d4b3272e17934e253263a1cb99bae211b80 (diff) | |
download | cpython-b0613599907ab9d9823f6a79725134d206fdf180.tar.gz |
Issue #21811: Anticipated fixes to 3.x and 2.7 for OS X 10.10 Yosemite.
Diffstat (limited to 'Lib/distutils/tests/test_build_ext.py')
-rw-r--r-- | Lib/distutils/tests/test_build_ext.py | 12 |
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 9853abd4c5..e9958667a4 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], |