@@ -113,7 +113,7 @@ index 1f6baed66d3..235dd98c60a 100644
113
113
macos_release = mac_ver()[0]
114
114
if macos_release:
115
115
diff --git a/Lib/sysconfig/__init__.py b/Lib/sysconfig/__init__.py
116
- index 69f72452c40..34ce643340b 100644
116
+ index 18e6b8d25e5..4994c56778c 100644
117
117
--- a/Lib/sysconfig/__init__.py
118
118
+++ b/Lib/sysconfig/__init__.py
119
119
@@ -719,6 +719,14 @@
@@ -163,7 +163,7 @@ index ec0857a4a99..2350e9dc821 100644
163
163
# elif !defined(TARGET_OS_OSX) || TARGET_OS_OSX
164
164
PLATFORM_TRIPLET=darwin
165
165
diff --git a/configure b/configure
166
- index d46bc563a67..d5cd81d16a8 100755
166
+ index d0ae103014a..308124ef06d 100755
167
167
--- a/configure
168
168
+++ b/configure
169
169
@@ -974,6 +974,8 @@
@@ -588,7 +588,7 @@ index d46bc563a67..d5cd81d16a8 100755
588
588
fi
589
589
ac_fn_c_check_func "$LINENO" "pread" "ac_cv_func_pread"
590
590
if test "x$ac_cv_func_pread" = xyes
591
- @@ -19860 ,12 +19973 ,6 @@
591
+ @@ -19866 ,12 +19979 ,6 @@
592
592
then :
593
593
printf "%s\n" "#define HAVE_SIGACTION 1" >>confdefs.h
594
594
@@ -601,7 +601,7 @@ index d46bc563a67..d5cd81d16a8 100755
601
601
fi
602
602
ac_fn_c_check_func "$LINENO" "sigfillset" "ac_cv_func_sigfillset"
603
603
if test "x$ac_cv_func_sigfillset" = xyes
604
- @@ -20134 ,11 +20241 ,11 @@
604
+ @@ -20140 ,11 +20247 ,11 @@
605
605
606
606
fi
607
607
@@ -615,7 +615,7 @@ index d46bc563a67..d5cd81d16a8 100755
615
615
ac_fn_c_check_func "$LINENO" "getentropy" "ac_cv_func_getentropy"
616
616
if test "x$ac_cv_func_getentropy" = xyes
617
617
then :
618
- @@ -20160 ,6 +20267 ,53 @@
618
+ @@ -20166 ,6 +20273 ,53 @@
619
619
620
620
fi
621
621
@@ -669,7 +669,7 @@ index d46bc563a67..d5cd81d16a8 100755
669
669
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $CC options needed to detect all undeclared functions" >&5
670
670
printf %s "checking for $CC options needed to detect all undeclared functions... " >&6; }
671
671
if test ${ac_cv_c_undeclared_builtin_options+y}
672
- @@ -23242 ,7 +23396 ,8 @@
672
+ @@ -23248 ,7 +23402 ,8 @@
673
673
674
674
675
675
# check for openpty, login_tty, and forkpty
@@ -679,7 +679,7 @@ index d46bc563a67..d5cd81d16a8 100755
679
679
680
680
for ac_func in openpty
681
681
do :
682
- @@ -23356 ,7 +23511 ,7 @@
682
+ @@ -23362 ,7 +23517 ,7 @@
683
683
fi
684
684
685
685
done
@@ -688,15 +688,15 @@ index d46bc563a67..d5cd81d16a8 100755
688
688
printf %s "checking for library containing login_tty... " >&6; }
689
689
if test ${ac_cv_search_login_tty+y}
690
690
then :
691
- @@ -23539 ,6 +23694 ,7 @@
691
+ @@ -23545 ,6 +23700 ,7 @@
692
692
fi
693
693
694
694
done
695
695
+ fi
696
696
697
697
# check for long file support functions
698
698
ac_fn_c_check_func "$LINENO" "fseek64" "ac_cv_func_fseek64"
699
- @@ -23804 ,10 +23960 ,10 @@
699
+ @@ -23810 ,10 +23966 ,10 @@
700
700
701
701
done
702
702
@@ -709,7 +709,7 @@ index d46bc563a67..d5cd81d16a8 100755
709
709
then
710
710
711
711
for ac_func in clock_settime
712
- @@ -26146 ,8 +26302 ,8 @@
712
+ @@ -26152 ,8 +26308 ,8 @@
713
713
LIBPYTHON="\$(BLDLIBRARY)"
714
714
fi
715
715
@@ -720,7 +720,7 @@ index d46bc563a67..d5cd81d16a8 100755
720
720
MODULE_DEPS_SHARED="$MODULE_DEPS_SHARED \$(PYTHONFRAMEWORKDIR)/\$(PYTHONFRAMEWORK)"
721
721
fi
722
722
723
- @@ -29017 ,7 +29173 ,7 @@
723
+ @@ -29023 ,7 +29179 ,7 @@
724
724
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for device files" >&5
725
725
printf "%s\n" "$as_me: checking for device files" >&6;}
726
726
@@ -729,7 +729,7 @@ index d46bc563a67..d5cd81d16a8 100755
729
729
ac_cv_file__dev_ptmx=no
730
730
ac_cv_file__dev_ptc=no
731
731
else
732
- @@ -29510 ,7 +29666 ,7 @@
732
+ @@ -29504 ,7 +29660 ,7 @@
733
733
with_ensurepip=no ;; #(
734
734
WASI) :
735
735
with_ensurepip=no ;; #(
@@ -738,7 +738,7 @@ index d46bc563a67..d5cd81d16a8 100755
738
738
with_ensurepip=no ;; #(
739
739
*) :
740
740
with_ensurepip=upgrade
741
- @@ -30490 ,7 +30646 ,7 @@
741
+ @@ -30484 ,7 +30640 ,7 @@
742
742
;; #(
743
743
Darwin) :
744
744
;; #(
@@ -747,7 +747,7 @@ index d46bc563a67..d5cd81d16a8 100755
747
747
748
748
749
749
750
- @@ -34493 ,6 +34649 ,8 @@
750
+ @@ -34487 ,6 +34643 ,8 @@
751
751
"Mac/Resources/framework/Info.plist") CONFIG_FILES="$CONFIG_FILES Mac/Resources/framework/Info.plist" ;;
752
752
"Mac/Resources/app/Info.plist") CONFIG_FILES="$CONFIG_FILES Mac/Resources/app/Info.plist" ;;
753
753
"iOS/Resources/Info.plist") CONFIG_FILES="$CONFIG_FILES iOS/Resources/Info.plist" ;;
@@ -757,7 +757,7 @@ index d46bc563a67..d5cd81d16a8 100755
757
757
"Misc/python.pc") CONFIG_FILES="$CONFIG_FILES Misc/python.pc" ;;
758
758
"Misc/python-embed.pc") CONFIG_FILES="$CONFIG_FILES Misc/python-embed.pc" ;;
759
759
diff --git a/configure.ac b/configure.ac
760
- index faa89095303..9bd51f7da97 100644
760
+ index 8bb0f1c6ef4..bfd67de48bb 100644
761
761
--- a/configure.ac
762
762
+++ b/configure.ac
763
763
@@ -330,6 +330,12 @@
@@ -1128,7 +1128,7 @@ index faa89095303..9bd51f7da97 100644
1128
1128
+ pipe2 plock poll posix_fadvise posix_fallocate posix_openpt \
1129
1129
pread preadv preadv2 process_vm_readv \
1130
1130
pthread_cond_timedwait_relative_np pthread_condattr_setclock pthread_init \
1131
- pthread_kill pthread_getname_np pthread_setname_np \
1131
+ pthread_kill pthread_getname_np pthread_setname_np pthread_getattr_np \
1132
1132
@@ -5153,7 +5283,7 @@
1133
1133
sched_setparam sched_setscheduler sem_clockwait sem_getvalue sem_open \
1134
1134
sem_timedwait sem_unlink sendfile setegid seteuid setgid sethostname \
@@ -1232,7 +1232,7 @@ index faa89095303..9bd51f7da97 100644
1232
1232
ac_cv_file__dev_ptmx=no
1233
1233
ac_cv_file__dev_ptc=no
1234
1234
else
1235
- @@ -7187 ,7 +7327 ,7 @@
1235
+ @@ -7174 ,7 +7314 ,7 @@
1236
1236
AS_CASE([$ac_sys_system],
1237
1237
[Emscripten], [with_ensurepip=no],
1238
1238
[WASI], [with_ensurepip=no],
@@ -1241,7 +1241,7 @@ index faa89095303..9bd51f7da97 100644
1241
1241
[with_ensurepip=upgrade]
1242
1242
)
1243
1243
])
1244
- @@ -7598 ,7 +7738 ,7 @@
1244
+ @@ -7585 ,7 +7725 ,7 @@
1245
1245
[VxWorks*], [PY_STDLIB_MOD_SET_NA([_scproxy], [termios], [grp])],
1246
1246
dnl The _scproxy module is available on macOS
1247
1247
[Darwin], [],
@@ -1270,141 +1270,6 @@ index c3e261ecd9e..26ef7a95de4 100644
1270
1270
<key>CFBundleSupportedPlatforms</key>
1271
1271
<array>
1272
1272
<string>iPhoneOS</string>
1273
- diff --git a/iOS/testbed/__main__.py b/iOS/testbed/__main__.py
1274
- index b4499f5ac17..d12a5ab065b 100644
1275
- --- a/iOS/testbed/__main__.py
1276
- +++ b/iOS/testbed/__main__.py
1277
- @@ -82,19 +82,29 @@
1278
-
1279
- # Return a list of UDIDs associated with booted simulators
1280
- async def list_devices():
1281
- - # List the testing simulators, in JSON format
1282
- - raw_json = await async_check_output(
1283
- - "xcrun", "simctl", "--set", "testing", "list", "-j"
1284
- - )
1285
- - json_data = json.loads(raw_json)
1286
- -
1287
- - # Filter out the booted iOS simulators
1288
- - return [
1289
- - simulator["udid"]
1290
- - for runtime, simulators in json_data["devices"].items()
1291
- - for simulator in simulators
1292
- - if runtime.split(".")[-1].startswith("iOS") and simulator["state"] == "Booted"
1293
- - ]
1294
- + try:
1295
- + # List the testing simulators, in JSON format
1296
- + raw_json = await async_check_output(
1297
- + "xcrun", "simctl", "--set", "testing", "list", "-j"
1298
- + )
1299
- + json_data = json.loads(raw_json)
1300
- +
1301
- + # Filter out the booted iOS simulators
1302
- + return [
1303
- + simulator["udid"]
1304
- + for runtime, simulators in json_data["devices"].items()
1305
- + for simulator in simulators
1306
- + if runtime.split(".")[-1].startswith("iOS") and simulator["state"] == "Booted"
1307
- + ]
1308
- + except subprocess.CalledProcessError as e:
1309
- + # If there's no ~/Library/Developer/XCTestDevices folder (which is the
1310
- + # case on fresh installs, and in some CI environments), `simctl list`
1311
- + # returns error code 1, rather than an empty list. Handle that case,
1312
- + # but raise all other errors.
1313
- + if e.returncode == 1:
1314
- + return []
1315
- + else:
1316
- + raise
1317
-
1318
-
1319
- async def find_device(initial_devices):
1320
- @@ -230,33 +240,69 @@
1321
- shutil.copytree(source, target, symlinks=True)
1322
- print(" done")
1323
-
1324
- + xc_framework_path = target / "Python.xcframework"
1325
- + sim_framework_path = xc_framework_path / "ios-arm64_x86_64-simulator"
1326
- if framework is not None:
1327
- if framework.suffix == ".xcframework":
1328
- print(" Installing XCFramework...", end="", flush=True)
1329
- - xc_framework_path = (target / "Python.xcframework").resolve()
1330
- if xc_framework_path.is_dir():
1331
- shutil.rmtree(xc_framework_path)
1332
- else:
1333
- - xc_framework_path.unlink()
1334
- + xc_framework_path.unlink(missing_ok=True)
1335
- xc_framework_path.symlink_to(
1336
- framework.relative_to(xc_framework_path.parent, walk_up=True)
1337
- )
1338
- print(" done")
1339
- else:
1340
- print(" Installing simulator framework...", end="", flush=True)
1341
- - sim_framework_path = (
1342
- - target / "Python.xcframework" / "ios-arm64_x86_64-simulator"
1343
- - ).resolve()
1344
- if sim_framework_path.is_dir():
1345
- shutil.rmtree(sim_framework_path)
1346
- else:
1347
- - sim_framework_path.unlink()
1348
- + sim_framework_path.unlink(missing_ok=True)
1349
- sim_framework_path.symlink_to(
1350
- framework.relative_to(sim_framework_path.parent, walk_up=True)
1351
- )
1352
- print(" done")
1353
- else:
1354
- - print(" Using pre-existing iOS framework.")
1355
- + if (
1356
- + xc_framework_path.is_symlink()
1357
- + and not xc_framework_path.readlink().is_absolute()
1358
- + ):
1359
- + # XCFramework is a relative symlink. Rewrite the symlink relative
1360
- + # to the new location.
1361
- + print(" Rewriting symlink to XCframework...", end="", flush=True)
1362
- + orig_xc_framework_path = (
1363
- + source
1364
- + / xc_framework_path.readlink()
1365
- + ).resolve()
1366
- + xc_framework_path.unlink()
1367
- + xc_framework_path.symlink_to(
1368
- + orig_xc_framework_path.relative_to(
1369
- + xc_framework_path.parent, walk_up=True
1370
- + )
1371
- + )
1372
- + print(" done")
1373
- + elif (
1374
- + sim_framework_path.is_symlink()
1375
- + and not sim_framework_path.readlink().is_absolute()
1376
- + ):
1377
- + print(" Rewriting symlink to simulator framework...", end="", flush=True)
1378
- + # Simulator framework is a relative symlink. Rewrite the symlink
1379
- + # relative to the new location.
1380
- + orig_sim_framework_path = (
1381
- + source
1382
- + / "Python.XCframework"
1383
- + / sim_framework_path.readlink()
1384
- + ).resolve()
1385
- + sim_framework_path.unlink()
1386
- + sim_framework_path.symlink_to(
1387
- + orig_sim_framework_path.relative_to(
1388
- + sim_framework_path.parent, walk_up=True
1389
- + )
1390
- + )
1391
- + print(" done")
1392
- + else:
1393
- + print(" Using pre-existing iOS framework.")
1394
-
1395
- for app_src in apps:
1396
- print(f" Installing app {app_src.name!r}...", end="", flush=True)
1397
- @@ -372,8 +418,8 @@
1398
-
1399
- if context.subcommand == "clone":
1400
- clone_testbed(
1401
- - source=Path(__file__).parent,
1402
- - target=Path(context.location),
1403
- + source=Path(__file__).parent.resolve(),
1404
- + target=Path(context.location).resolve(),
1405
- framework=Path(context.framework).resolve() if context.framework else None,
1406
- apps=[Path(app) for app in context.apps],
1407
- )
1408
1273
--- /dev/null
1409
1274
+++ b/tvOS/README.rst
1410
1275
@@ -0,0 +1,108 @@
0 commit comments