Android python builds from cpython source
Description
Recently cpython upstream added support for building python for android https://github.com/python/cpython/tree/main/Android Bombsquad should switch to this for getting python as this will be better supported and will also help when the java layer is eventually open-sourced
i havent tried it myself but the instructions seem pretty straight forward
I think the build scripts I'm using in pybuild.py (which come from https://github.com/GRRedWings/python3-android) are effectively taking advantage of this native support already. It used to be that these builds would consider themselves to be 'linux' (if you poke around in the platform module) but they now show up as 'android'.
There are also a number of external libraries (OpenSSL, zlib, sqlite, etc) which need to be compiled for Python to be happy, and the above repo build scripts also takes care of those.
If there is ever a more 'out of the box' solution that gives us all those libs plus python libs for all Android architectures then I'm open to switching to that (I recently did essentially that for Apple builds) - but I don't think Python itself provides that even though Android is now an officially supported platform (please correct me if I'm wrong).
There are also a number of external libraries (OpenSSL, zlib, sqlite, etc) which need to be compiled for Python to be happy, and the above repo build scripts also takes care of those.
The readme states that we can pass configuration parameters like --enable-loadable-sqlite-extensions which should add those modules ig
And they already have a workflow for building it https://github.com/python/cpython/actions/runs/17364133231/job/49288271656 So u could modify it to see if it can fit the needs
The repository @efroemling mentioned got deprecated a month ago for the same reason So ig you'll have to switch to the cpython upstream for pi-thon3.14