Issue #21811: Anticipated fixes to 3.x and 2.7 for OS X 10.10 Yosemite.

This commit is contained in:
Ned Deily 2014-06-25 13:36:14 -07:00
parent 975735f729
commit 04cdfa1147
6 changed files with 40 additions and 18 deletions

View file

@ -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],