Skip to content

Commit ecf5748

Browse files
ronaldoussorenjaraco
authored andcommitted
bpo-42504: Ensure that get_config_var('MACOSX_DEPLOYMENT_TARGET') is a string (GH-24341)
* bpo-42504: Ensure that get_config_var('MACOSX_DEPLOYMENT_TARGET') is a string
1 parent 22c5f7d commit ecf5748

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

distutils/tests/test_build_ext.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -456,7 +456,7 @@ def test_deployment_target_higher_ok(self):
456456
deptarget = sysconfig.get_config_var('MACOSX_DEPLOYMENT_TARGET')
457457
if deptarget:
458458
# increment the minor version number (i.e. 10.6 -> 10.7)
459-
deptarget = [int(x) for x in str(deptarget).split('.')]
459+
deptarget = [int(x) for x in deptarget.split('.')]
460460
deptarget[-1] += 1
461461
deptarget = '.'.join(str(i) for i in deptarget)
462462
self._try_compile_deployment_target('<', deptarget)
@@ -489,7 +489,7 @@ def _try_compile_deployment_target(self, operator, target):
489489

490490
# get the deployment target that the interpreter was built with
491491
target = sysconfig.get_config_var('MACOSX_DEPLOYMENT_TARGET')
492-
target = tuple(map(int, str(target).split('.')[0:2]))
492+
target = tuple(map(int, target.split('.')[0:2]))
493493
# format the target value as defined in the Apple
494494
# Availability Macros. We can't use the macro names since
495495
# at least one value we test with will not exist yet.

0 commit comments

Comments
 (0)