Repository navigation
Add support for Android - #10233
Add support for Android#10233mhsmith wants to merge 24 commits into
Conversation
|
Hi. Could you let me know - what was your thinking behind creating this as a draft? You could simply run our CI in your own fork and inspect the results there. Or do you think this is close to being finished, and are hoping for support? |
Sorry, I didn't realize the project required CI approval for new contributors. I'll work on a different branch on my own fork, and update the PR once it's ready for review, which should be within the next few days. |
…ls-dependencies.sh
|
@mhsmith I just want to say that you're probably the most important person for Python developers on Android—please never give up on porting popular Python packages to Android. |
|
This PR is now ready for review. I've updated the description above. |
|
Is the bzip2 patch intended to be permanent? It would be ideal if the functionality could one day be added upstream. |
As with iOS, most of the work was in wheels-dependencies.sh. I've explained the Android-specific changes with comments in the code, but here's a summary of changes that affect other platforms:
wheels-dependencies.sh now runs as a
before-buildscript rather thanbefore-all. This has several advantages:CIBUILDWHEEL_BUILD_IDENTIFIERenvironment variable. This means you can now run cibuildwheel in any of its supported modes, including building multiple architectures in one command, or using--onlywith no environment variables at all.stampfiles and finish quickly without rebuilding anything.To improve consistency between platforms, and reduce clutter in the build directory,
WORKDIRis now set tobuild/deps/os_arch, whereos_archis the second half ofCIBUILDWHEEL_BUILD_IDENTIFIER, e.g.android_x86_64ormacosx_arm64.BUILD_PREFIXis now set to$WORKDIR/prefix. Linux continues to install dependencies to /usr/local as before.Introduced an
IS_LINUXflag, since-z $IS_MACOScan now mean either Linux or Android.For consistency, cmake is now installed from PyPI on all platforms, not just macOS. pkg-config is now also installed from PyPI rather than building it from source.
Factored out the test sequence (selftest, check_wheel, Tests) into a wheels_test script which is shared by all platforms. This was necessary because on Android, cibuildwheel requires
test-commandto be a single Python command.