Compare commits

..

No commits in common. "ae67db6b314e297a1b67ed15c0bb560b8ce5b856" and "9b34f34aa929941576a69a6f7de77f1fb0b96ed6" have entirely different histories.

6 changed files with 7 additions and 21 deletions

View File

@ -54,8 +54,8 @@ def spawn(cmd, search_path=1, verbose=0, dry_run=0):
global _cfg_target, _cfg_target_split
if _cfg_target is None:
from distutils import sysconfig
_cfg_target = str(sysconfig.get_config_var(
'MACOSX_DEPLOYMENT_TARGET') or '')
_cfg_target = sysconfig.get_config_var(
'MACOSX_DEPLOYMENT_TARGET') or ''
if _cfg_target:
_cfg_target_split = [int(x) for x in _cfg_target.split('.')]
if _cfg_target:

View File

@ -455,7 +455,7 @@ class BuildExtTestCase(TempdirManager,
deptarget = sysconfig.get_config_var('MACOSX_DEPLOYMENT_TARGET')
if deptarget:
# increment the minor version number (i.e. 10.6 -> 10.7)
deptarget = [int(x) for x in str(deptarget).split('.')]
deptarget = [int(x) for x in deptarget.split('.')]
deptarget[-1] += 1
deptarget = '.'.join(str(i) for i in deptarget)
self._try_compile_deployment_target('<', deptarget)
@ -488,7 +488,7 @@ 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, str(target).split('.')[0:2]))
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.
@ -497,11 +497,7 @@ class BuildExtTestCase(TempdirManager,
target = '%02d%01d0' % target
else:
# for 10.10 and beyond -> "10nn00"
if len(target) >= 2:
target = '%02d%02d00' % target
else:
# 11 and later can have no minor version (11 instead of 11.0)
target = '%02d0000' % target
target = '%02d%02d00' % target
deptarget_ext = Extension(
'deptarget',
[deptarget_c],

View File

@ -1045,7 +1045,7 @@ class PosixTester(unittest.TestCase):
if sys.platform == 'darwin':
import sysconfig
dt = sysconfig.get_config_var('MACOSX_DEPLOYMENT_TARGET') or '10.0'
if tuple(int(n) for n in str(dt).split('.')[0:2]) < (10, 6):
if tuple(int(n) for n in dt.split('.')[0:2]) < (10, 6):
raise unittest.SkipTest("getgroups(2) is broken prior to 10.6")
# 'id -G' and 'os.getgroups()' should return the same

View File

@ -1,5 +1,4 @@
import unittest
import sys
import tkinter
from tkinter import ttk
from test import support
@ -137,10 +136,6 @@ class StyleTest(AbstractTkTest, unittest.TestCase):
with self.subTest(theme=theme, name=name):
if support.verbose >= 2:
print('configure', theme, name, default)
if (theme in ('vista', 'xpnative')
and sys.getwindowsversion()[:2] == (6, 1)):
# Fails on the Windows 7 buildbot
continue
newname = f'C.{name}'
self.assertEqual(style.configure(newname), None)
style.configure(newname, **default)
@ -163,10 +158,6 @@ class StyleTest(AbstractTkTest, unittest.TestCase):
with self.subTest(theme=theme, name=name):
if support.verbose >= 2:
print('map', theme, name, default)
if (theme in ('vista', 'xpnative')
and sys.getwindowsversion()[:2] == (6, 1)):
# Fails on the Windows 7 buildbot
continue
newname = f'C.{name}'
self.assertEqual(style.map(newname), {})
style.map(newname, **default)

View File

@ -1 +0,0 @@
Fix build on macOS Big Sur when MACOSX_DEPLOYMENT_TARGET=11

View File

@ -1012,7 +1012,7 @@ class PyBuildExt(build_ext):
os_release = int(os.uname()[2].split('.')[0])
dep_target = sysconfig.get_config_var('MACOSX_DEPLOYMENT_TARGET')
if (dep_target and
(tuple(int(n) for n in str(dep_target).split('.')[0:2])
(tuple(int(n) for n in dep_target.split('.')[0:2])
< (10, 5) ) ):
os_release = 8
if os_release < 9: