Repository navigation
Move Android folder to Platforms #146445
Description
Activity
- addedtype-refactorCode refactoring (with no changes in behavior)Code refactoring (with no changes in behavior)triagedThe issue has been accepted as valid by a triager.The issue has been accepted as valid by a triager.
on Mar 26, 2026 @mhsmith As part of this migration, I'd like to move the
android.pyscript toPlatform/Android/__main__.py; that makes the build script entry point consistent with Emscripten, iOS and WASI.Two questions that emerge from that:
- Do you think we need to retain the
Android/android.pyscript as a backwards compatibility shim? Can you think of anything outside the CPython build ecosystem that might be relying on that location in the Python source tree? I haven't done this for iOS, on the basis that the only consumers of that folder is CPython's own build processes. - I know cibuildwheel relies on the
android.pyname in the release package, so I'll need to rename it there as part of the packaging process; but is there anything else you can think of that might be relying on theandroid.pyname specifically?
- Do you think we need to retain the
Apart from cibuldwheel, I don't think there are any other external references to the android.py name. However, there are many references in the Android/README, and in android.py itself via SCRIPT_NAME.
The README in particular would be awkward to update to accommodate two names, so maybe we can leave android.py at its original name, and add a
__main__.pylauncher script to provide a consistent entry point.There are also a couple of references to the Android/README path that would need to be updated, including Doc/using/android.rst, and the dev guide, which looks like it might need some updates for Emscripten and iOS as well. WASI has already been updated, and uses tabs to handle differences between different Python versions.
Agreed there's a bunch of dev guide references that need updates. That work is on my todo list.
I'm not sure the README issue is that bad. To my read, most of the potential confusion comes because the "how you run the test suite" assumes running the CPython test suite with a release package is a common use case. While it's certainly possible, I think the instructions can be made fairly clear by separating the "how to test CPython" from "how to test your third party package". I'll include that rework in my PR applying the rename.
Reacted by Malcolm Smith
As part of the general cleanup of the repository to put all platform build tooling into the
Platformsfolder, we need to move theAndroidfolder toPlatforms/Android.Linked PRs