Skip to content

gh-146444: Move the Apple folder to the Platforms directory#146497

Merged
freakboy3742 merged 5 commits intopython:mainfrom
freakboy3742:apple-platforms
Mar 27, 2026
Merged

gh-146444: Move the Apple folder to the Platforms directory#146497
freakboy3742 merged 5 commits intopython:mainfrom
freakboy3742:apple-platforms

Conversation

@freakboy3742
Copy link
Contributor

@freakboy3742 freakboy3742 commented Mar 26, 2026

Part of the broader migration of platform build scripts into the Platforms folder.

Does a complete move - there's no compatibility shim for the old script location. Given the script is only used by CPython's build system, it didn't seems necessary; happy to revisit that if people think otherwise.

The iOS folder hasn't been deleted (yet); it needs to be retained until the buildbot configuration can be switched over to use the Platforms build script (see python/buildmaster-config#691). Once the buildbot has been updated, we can delete the iOS folder as a follow up PR.

@freakboy3742
Copy link
Contributor Author

!buildbot iOS

@bedevere-bot
Copy link

🤖 New build scheduled with the buildbot fleet by @freakboy3742 for commit d54f9df 🤖

Results will be shown at:

https://buildbot.python.org/all/#/grid?branch=refs%2Fpull%2F146497%2Fmerge

The command will test the builders whose names match following regular expression: iOS

The builders matched are:

  • iOS ARM64 Simulator PR

@brianschubert
Copy link
Contributor

re: the pre-commit errors, you'll need to update the ruff hooks for the Apple/ directory in .pre-commit-config.yaml:

diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml
index dfd18182105..ffff35fc7fe 100644
--- a/.pre-commit-config.yaml
+++ b/.pre-commit-config.yaml
@@ -5,7 +5,7 @@ repos:
       - id: ruff-check
         name: Run Ruff (lint) on Apple/
         args: [--exit-non-zero-on-fix, --config=Apple/.ruff.toml]
-        files: ^Apple/
+        files: ^Platforms/Apple/
       - id: ruff-check
         name: Run Ruff (lint) on Doc/
         args: [--exit-non-zero-on-fix]
@@ -41,7 +41,7 @@ repos:
       - id: ruff-format
         name: Run Ruff (format) on Apple/
         args: [--exit-non-zero-on-fix, --config=Apple/.ruff.toml]
-        files: ^Apple
+        files: ^Platforms/Apple
       - id: ruff-format
         name: Run Ruff (format) on Doc/
         args: [--exit-non-zero-on-fix]

Copy link
Member

@ned-deily ned-deily left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM. I ran my standard test build of all three iOS architectures without errors, having first removed the legacy ./iOS directory just to be sure. I also then ran the testios Makefile step for the arm64-apple-ios-simulator architecture with no test suite errors. The build and simulator run was on macOS 26.4 using an older Xcode 16.4 16F6 with its default SDKs.

FWIW, I was unable to build the arm64-apple-ios-simulator arch using the just-released Xcode 26.4 17E192; it failed with errors in posixmodule.c, no doubt unrelated to the changes in this PR. The build of arm64-apple-ios succeeded.

../Modules/posixmodule.c:11833:15: error: call to undeclared function 'dup3'; ISO C99 and later do not support implicit function declarations [-Wimplicit-function-declaration]
 11833 |         res = dup3(fd, fd2, O_CLOEXEC);
       |               ^
../Modules/posixmodule.c:12701:11: error: call to undeclared function 'pipe2'; ISO C99 and later do not support implicit function declarations [-Wimplicit-function-declaration]
 12701 |     res = pipe2(fds, O_CLOEXEC);
       |           ^
../Modules/posixmodule.c:12701:11: note: did you mean 'pipe'?
/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator26.4.sdk/usr/include/unistd.h:482:6: note: 'pipe' declared here
  482 | int      pipe(int [2]);
      |          ^
../Modules/posixmodule.c:12758:11: error: call to undeclared function 'pipe2'; ISO C99 and later do not support implicit function declarations [-Wimplicit-function-declaration]
 12758 |     res = pipe2(fds, flags);
       |           ^

@freakboy3742
Copy link
Contributor Author

FWIW, I was unable to build the arm64-apple-ios-simulator arch using the just-released Xcode 26.4 17E192; it failed with errors in posixmodule.c, no doubt unrelated to the changes in this PR. The build of arm64-apple-ios succeeded.

Well that's fun... something for me to investigate (although I need to upgrade to macOS 26 first... currently stuck in limbo waiting for a possible laptop upgrade).

I've marked this DO NOT MERGE temporarily; it will be easier to backport if #146499 lands first.

@freakboy3742 freakboy3742 enabled auto-merge (squash) March 27, 2026 02:28
@freakboy3742 freakboy3742 merged commit 36e4ffc into python:main Mar 27, 2026
52 checks passed
@freakboy3742 freakboy3742 deleted the apple-platforms branch March 27, 2026 02:50
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants