Skip to content

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

Open
robertkirkman wants to merge 3 commits intopython:mainfrom
robertkirkman:32-bit-android-testbed
Open

gh-146541: Allow building the Android testbed for 32-bit targets#146542
robertkirkman wants to merge 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.

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

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Android testbed fails to build for 32-bit targets

4 participants