Skip to content

gh-146541: Allow building the Android testbed for 32-bit targets#146542

Merged
freakboy3742 merged 3 commits intopython:mainfrom
robertkirkman:32-bit-android-testbed
Apr 4, 2026
Merged

gh-146541: Allow building the Android testbed for 32-bit targets#146542
freakboy3742 merged 3 commits intopython:mainfrom
robertkirkman:32-bit-android-testbed

Conversation

@robertkirkman
Copy link
Copy Markdown
Contributor

@robertkirkman robertkirkman commented Mar 28, 2026

This allows building the Android testbed for 32-bit targets using the prebuilt 32-bit dependencies that are already available here: https://github.com/beeware/cpython-android-source-deps/releases , adding the target triplets to match them, arm-linux-androideabi and i686-linux-android.

This also adds the arm key to the dictionary used to convert the machine variable to an Android ABI in sysconfig.get_platform(), because when the Android testbed is being cross-compiled, it stores the contents of the first substring of _PYTHON_HOST_PLATFORM before the first - symbol in the machine variable, which the dictionary does not currently handle.

@freakboy3742
Copy link
Copy Markdown
Contributor

I'll wait until @mhsmith weighs in to confirm I haven't missed anything, but I think this all makes sense, and shouldn't impact the 64-bit builds.

@mhsmith
Copy link
Copy Markdown
Member

mhsmith commented Apr 2, 2026

I think it would be OK to backport this to 3.13 and 3.14 to avoid future merge conflicts, as it only affects Android-specific build and test code and doesn't add any new features to Python itself.

@mhsmith mhsmith added needs backport to 3.13 bugs and security fixes needs backport to 3.14 bugs and security fixes labels Apr 2, 2026
@robertkirkman robertkirkman marked this pull request as draft April 2, 2026 17:36
@robertkirkman robertkirkman force-pushed the 32-bit-android-testbed branch 2 times, most recently from 0208457 to 6c53216 Compare April 2, 2026 22:44
This allows building the Android testbed for 32-bit targets using the prebuilt 32-bit dependencies that are already available here: https://github.com/beeware/cpython-android-source-deps/releases , adding the target triplets to match them, `arm-linux-androideabi` and `i686-linux-android`.

This also adds the `arm` key to the dictionary used to convert the `machine` variable to an Android ABI in `sysconfig.get_platform()`, because when the Android testbed is being cross-compiled, it stores the contents of the first substring of `_PYTHON_HOST_PLATFORM` before the first `-` symbol in the `machine` variable, which the dictionary does not currently handle.
@robertkirkman robertkirkman force-pushed the 32-bit-android-testbed branch from 6c53216 to 6eecb18 Compare April 2, 2026 22:50
@robertkirkman robertkirkman force-pushed the 32-bit-android-testbed branch from 6eecb18 to b2d3a75 Compare April 2, 2026 22:53
@robertkirkman robertkirkman marked this pull request as ready for review April 2, 2026 22:54
Copy link
Copy Markdown
Member

@mhsmith mhsmith left a comment

Choose a reason for hiding this comment

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

Thanks, this all looks good to me. In future, please don't force push a PR which has already been reviewed, as it makes the history difficult to understand.

@mhsmith
Copy link
Copy Markdown
Member

mhsmith commented Apr 3, 2026

!buildbot aarch64 android

@bedevere-bot
Copy link
Copy Markdown

🤖 New build scheduled with the buildbot fleet by @mhsmith for commit c92b23e 🤖

Results will be shown at:

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

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

The builders matched are:

  • aarch64 Android PR

@mhsmith
Copy link
Copy Markdown
Member

mhsmith commented Apr 3, 2026

@freakboy3742: Ready to merge.

Copy link
Copy Markdown
Contributor

@freakboy3742 freakboy3742 left a comment

Choose a reason for hiding this comment

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

Thanks @robertkirkman for the PR, and @mhsmith for the review.

@freakboy3742 freakboy3742 merged commit 848bbe9 into python:main Apr 4, 2026
60 checks passed
@miss-islington-app
Copy link
Copy Markdown

Thanks @robertkirkman for the PR, and @freakboy3742 for merging it 🌮🎉.. I'm working now to backport this PR to: 3.13, 3.14.
🐍🍒⛏🤖

@miss-islington-app
Copy link
Copy Markdown

Sorry, @robertkirkman and @freakboy3742, I could not cleanly backport this to 3.14 due to a conflict.
Please backport using cherry_picker on command line.

cherry_picker 848bbe9ff21ae0a3ee412cc25843835ace4f75df 3.14

@miss-islington-app
Copy link
Copy Markdown

Sorry, @robertkirkman and @freakboy3742, I could not cleanly backport this to 3.13 due to a conflict.
Please backport using cherry_picker on command line.

cherry_picker 848bbe9ff21ae0a3ee412cc25843835ace4f75df 3.13

freakboy3742 pushed a commit to freakboy3742/cpython that referenced this pull request Apr 4, 2026
… targets (pythonGH-146542)

Allows building the Android testbed for 32-bit targets, adding the target triplets
`arm-linux-androideabi` and `i686-linux-android`.
(cherry picked from commit 848bbe9)

Co-authored-by: Robert Kirkman <[email protected]>
Co-authored-by: Malcolm Smith <[email protected]>
@bedevere-app
Copy link
Copy Markdown

bedevere-app bot commented Apr 4, 2026

GH-148064 is a backport of this pull request to the 3.14 branch.

@bedevere-app bedevere-app bot removed the needs backport to 3.14 bugs and security fixes label Apr 4, 2026
@freakboy3742
Copy link
Copy Markdown
Contributor

I agree a 3.14 backport is warranted, but the 3.13 backport turns out to be non-trivial due to a conflict in sysconfig. It's not a complex change, but it definitely puts it outside the territory of a non-invasive build system change.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

needs backport to 3.13 bugs and security fixes

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Android testbed fails to build for 32-bit targets

4 participants