Skip to content

Update buildbot to use XCframework build script.#691

Open
freakboy3742 wants to merge 5 commits intopython:mainfrom
freakboy3742:iOS-platforms-refactor
Open

Update buildbot to use XCframework build script.#691
freakboy3742 wants to merge 5 commits intopython:mainfrom
freakboy3742:iOS-platforms-refactor

Conversation

@freakboy3742
Copy link
Contributor

@freakboy3742 freakboy3742 commented Mar 25, 2026

The iOS XCframework build script will shortly be moved to Platforms/iOS.

This updates the Buildbot config to use the new XCframework buildbot in "slow" mode for 3.15+ builds (ensuring a full, multi-architecture XCframework is built and tested.

I haven't pushed the corresponding CPython PR yet; this is to explore options for branch-based configuration of the build script.

As I currently understand it, this will work for buildbot runs that are triggered on a merge of a PR on main, 3.13, 3.14, or the 3.15 branch (when it is forked). A PR build will succeed on main and 3.15 (when it is forked). But a PR build based off a 3.13/3.14 branch will fail (because there's currently no way to identify the base branch of a PR job).

python/cpython#146497 has the changes necessary for this build script to work.

It introduces a symlink for 3.14 compatibility. It falls back to the old build script for builds explicitly on the 3.13 branch. PR builds based off a 3.13 branch will fail as the XCframework script wasn't introduced until 3.14, and there's not currently any way to identify the base branch for a "custom" PR build.

@vstinner
Copy link
Member

But a PR build based off a 3.13/3.14 branch will fail (because there's currently no way to identify the base branch of a PR job).

Correct. IMO it's an acceptable trade-off. I don't see any simple solution using buildbot API to use different steps depending on an actual check run on the worker (ex: check if Platforms/Apple exists).

SetPropertyFromCommand() and util.Interpolate() can only be used to pass a string to a command, not really to use very different steps and commands (as you do in this PR).

@encukou
Copy link
Member

encukou commented Mar 26, 2026

It's probably not worth worrying about 3.13.

For 3.14, maybe do something like [ -e Platforms/Apple ] || (mkdir -p Platforms; ln -s ../Apple Platforms/Apple) for the custom?

@freakboy3742
Copy link
Contributor Author

It's probably not worth worrying about 3.13.

👍

For 3.14, maybe do something like [ -e Platforms/Apple ] || (mkdir -p Platforms; ln -s ../Apple Platforms/Apple) for the custom?

Good idea - I'll push an update shortly.

@freakboy3742 freakboy3742 force-pushed the iOS-platforms-refactor branch from 39e0ec3 to 1ee9d59 Compare March 27, 2026 01:06
[
ShellCommand(
name="Set up compatibility symlink (will fail on <= 3.13 branches)",
command="[ -e Platforms/Apple ] || ln -s ../Apple Platforms/Apple",
Copy link
Contributor Author

Choose a reason for hiding this comment

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

The docs say single-string format should work...

The Platforms folder exists on 3.14; it doesn't on 3.13 - so this command will fail early on a 3.13-based build.

@freakboy3742 freakboy3742 marked this pull request as ready for review March 27, 2026 03:46
@freakboy3742 freakboy3742 force-pushed the iOS-platforms-refactor branch from 87b6799 to 2de77fd Compare March 27, 2026 03:47
@freakboy3742 freakboy3742 requested a review from vstinner March 27, 2026 09:09
Copy link
Member

@vstinner vstinner left a comment

Choose a reason for hiding this comment

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

LGTM. python/cpython#146497 landed in the Python main branch, so this PR is ready to be merged, right? Just one coding style suggestion :-)

Comment on lines +1195 to +1196
self.addSteps(
[
Copy link
Member

Choose a reason for hiding this comment

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

Coding style suggestion: you may move [ after addSteps( to remove one indentation level.

Suggested change
self.addSteps(
[
self.addSteps([

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.

3 participants