Repository navigation
BLD: Add Android support - #30412
BLD: Add Android support#30412
Conversation
|
The 2.3.2-1 wheels here were built using the following procedure:
These wheels pass the entire test suite except for:
On Chaquopy 17, this workaround is required. |
rgommers
left a comment
There was a problem hiding this comment.
Thanks @mhsmith! It's fine to keep this PR open for reference if that's useful to you, however note that we're unlikely to do another 2.3.x release and even if we did, we'd want the changes to land in main first.
The test suite changes all seem fine, I'd be happy to merge those in a separate PR to main (possibly together with the related changes for iOS, to avoid the duplication).
The hardcoding of longdouble for Android (and iOS) also seems okay and fine to merge separately.
The wheel build changes I'd prefer to not merge, at least until everything upstream is ready and then we can reassess.
|
Thanks: I intend to create a set of similar PRs for numpy, pandas, scipy, and scikit-learn, so I can produce wheels of known versions for some Chaquopy users I'm working with. Once these PRs are fully working, I'll retarget them to the main branch of each project to enable them to release Android wheels on PyPI. |
|
I'd still be happy to merge all the test changes separately. In case you haven't seen it yet, we now have NEP 57 — NumPy platform support, defining CPython-like support tiers. It may be reasonable for this PR to aim to promote Android to Tier 3 by adding a CI job, similar to the current Emscripten one. |
These tests can be divided into two groups:
I've marked all of these tests as |
|
This PR is now ready for review. Since the only supported way of building for Android is via cibuildwheel, I think it's enough to add a matrix entry in wheels.yml, rather than adding a whole separate workflow file. The iOS PR #28759 is also complete, though it's currently blocked on numpy/meson#25.
Yes, I'd like to do that. As I understand it, the procedure would be to merge this PR to enable the CI job, and then submit a PR against NEP 57? |
|
Working on integrating the iOS fix now.
It'd be fine to do it in this same PR as well, might be even better since the merging of this PR is effectively the Tier 3 promotion.
Agreed. |
| # runner. So we build for ARM on a non-ARM runner, which will skip the tests. | ||
| - [ubuntu-24.04, android_arm64_v8a] | ||
| - [ubuntu-24.04, android_x86_64] | ||
| python: ["cp313"] |
There was a problem hiding this comment.
I thought about it for a bit; this is okay - it's usually set to the lowest supported Python version, but that's also covered by other jobs, so given that Android requires >=3.13, this is the easiest way to achieve that.
| if [[ $OPENBLAS == "android" ]]; then | ||
| python -m pip install \ | ||
| --target $pkgconf_path \ | ||
| --index-url https://chaquo.com/pypi-upstream/ \ |
There was a problem hiding this comment.
This is fine for this file; we wouldn't like it in numpy/numpy-release, but that has its own cibw_before_build.sh which doesn't have to be in sync with this one.
[skip ci]
|
Wheel build job times of 2 minutes for Thanks again @mhsmith! |
See numpygh-28759 for iOS and numpygh-30412 for Android. [skip actions]
Based on previous work:
I'm currently targeting the 2.3.x branch as part of a project I'm working on, but I'll rebase this PR on main once it's complete.