You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Feature Request: Add support for building Android wheels #810
@ankith26 thanks for the request. Could you add some details, like how it currently fails? And I assume there are Beeware patches that do make things work for meson-python that need upstreaming?
From what I can tell, the native-file that meson-python is passing right now is not correct for android. I think that meson-python should prepare and pass an android cross file that uses the environment variables that cibuildwheel has already set.
Activity
rgommers commentedon Oct 31, 2025
@ankith26 thanks for the request. Could you add some details, like how it currently fails? And I assume there are Beeware patches that do make things work for
meson-pythonthat need upstreaming?ankith26 commentedon Oct 31, 2025
For testing, I am using my very minimal sample/boilerplate repo (https://github.com/ankith26/python-c-extension-boilerplate).
I am relying on cibuildwheel to set up the build environment and manage the build. I first setup android-sdk as outlined in https://cibuildwheel.pypa.io/en/stable/platforms/#android. The command I ran
produces output
From what I can tell, the
native-filethatmeson-pythonis passing right now is not correct for android. I think thatmeson-pythonshould prepare and pass an android cross file that uses the environment variables thatcibuildwheelhas already set.rgommers commentedon Oct 31, 2025
Thanks @ankith26, that is helpful. Assuming it's similar to iOS in complexity, I don't see a problem with adding support.
There are working NumPy and SciPy builds at https://chaquo.com/chaquopy/, so let's ask the expert where the relevant patches are - @mhsmith, could you comment on this?
dnicolodi commentedon Oct 31, 2025
This https://nibblestew.blogspot.com/2025/10/building-android-apps-with-native-code.html may be relevant. It seems that it could be possible to rely on
meson env2mfileto generate a machine file.dnicolodi commentedon Nov 2, 2025
AFAICT, Chaquopy supports only "old" versions on NumPy and SciPy that use setuptools as build system.
mhsmith commentedon Nov 3, 2025
That's correct: the patches are here, but I haven't tried to build anything for Android with Meson yet.
Related:
rgommers commentedon Feb 8, 2026
The PR to implement support is pretty much ready: gh-824. I'm intending to merge that soon unless anyone sees a problem there, so please have a look.