bpo-41100: additional fixes for testing on macOS 11 Big Sur Intel
Note: macOS 11 is not yet released, this release of Python is not fully supported on 11.0, and not all tests pass.
This commit is contained in:
parent
cf79cbf447
commit
a0ad829596
|
@ -470,7 +470,7 @@ class BuildExtTestCase(TempdirManager,
|
||||||
# format the target value as defined in the Apple
|
# format the target value as defined in the Apple
|
||||||
# Availability Macros. We can't use the macro names since
|
# Availability Macros. We can't use the macro names since
|
||||||
# at least one value we test with will not exist yet.
|
# at least one value we test with will not exist yet.
|
||||||
if target[1] < 10:
|
if target[:2] < (10, 10):
|
||||||
# for 10.1 through 10.9.x -> "10n0"
|
# for 10.1 through 10.9.x -> "10n0"
|
||||||
target = '%02d%01d0' % target
|
target = '%02d%01d0' % target
|
||||||
else:
|
else:
|
||||||
|
|
|
@ -236,6 +236,11 @@ class PlatformTest(unittest.TestCase):
|
||||||
fd.close()
|
fd.close()
|
||||||
self.assertFalse(real_ver is None)
|
self.assertFalse(real_ver is None)
|
||||||
result_list = res[0].split('.')
|
result_list = res[0].split('.')
|
||||||
|
# macOS 11.0 (Big Sur) may report its version number
|
||||||
|
# as 10.16 if the executable is built with an older
|
||||||
|
# SDK target but sw_vers reports 11.0.
|
||||||
|
if result_list == ['10', '16']:
|
||||||
|
result_list = ['11', '0']
|
||||||
expect_list = real_ver.split('.')
|
expect_list = real_ver.split('.')
|
||||||
len_diff = len(result_list) - len(expect_list)
|
len_diff = len(result_list) - len(expect_list)
|
||||||
# On Snow Leopard, sw_vers reports 10.6.0 as 10.6
|
# On Snow Leopard, sw_vers reports 10.6.0 as 10.6
|
||||||
|
|
|
@ -0,0 +1,3 @@
|
||||||
|
Additional fixes for testing on macOS 11 Big Sur Intel. Note: macOS 11 is
|
||||||
|
not yet released, this release of Python is not fully supported on 11.0, and
|
||||||
|
not all tests pass.
|
|
@ -566,11 +566,7 @@ calculate_program_full_path(const _PyCoreConfig *core_config,
|
||||||
memset(program_full_path, 0, sizeof(program_full_path));
|
memset(program_full_path, 0, sizeof(program_full_path));
|
||||||
|
|
||||||
#ifdef __APPLE__
|
#ifdef __APPLE__
|
||||||
#if MAC_OS_X_VERSION_MAX_ALLOWED >= MAC_OS_X_VERSION_10_4
|
|
||||||
uint32_t nsexeclength = MAXPATHLEN;
|
uint32_t nsexeclength = MAXPATHLEN;
|
||||||
#else
|
|
||||||
unsigned long nsexeclength = MAXPATHLEN;
|
|
||||||
#endif
|
|
||||||
char execpath[MAXPATHLEN+1];
|
char execpath[MAXPATHLEN+1];
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
|
|
@ -9251,6 +9251,9 @@ fi
|
||||||
ppc)
|
ppc)
|
||||||
MACOSX_DEFAULT_ARCH="ppc64"
|
MACOSX_DEFAULT_ARCH="ppc64"
|
||||||
;;
|
;;
|
||||||
|
arm64)
|
||||||
|
MACOSX_DEFAULT_ARCH="arm64"
|
||||||
|
;;
|
||||||
*)
|
*)
|
||||||
as_fn_error $? "Unexpected output of 'arch' on OSX" "$LINENO" 5
|
as_fn_error $? "Unexpected output of 'arch' on OSX" "$LINENO" 5
|
||||||
;;
|
;;
|
||||||
|
|
|
@ -2456,6 +2456,9 @@ case $ac_sys_system/$ac_sys_release in
|
||||||
ppc)
|
ppc)
|
||||||
MACOSX_DEFAULT_ARCH="ppc64"
|
MACOSX_DEFAULT_ARCH="ppc64"
|
||||||
;;
|
;;
|
||||||
|
arm64)
|
||||||
|
MACOSX_DEFAULT_ARCH="arm64"
|
||||||
|
;;
|
||||||
*)
|
*)
|
||||||
AC_MSG_ERROR([Unexpected output of 'arch' on OSX])
|
AC_MSG_ERROR([Unexpected output of 'arch' on OSX])
|
||||||
;;
|
;;
|
||||||
|
|
Loading…
Reference in New Issue