Skip to content

Conversation

@thunder-coding
Copy link
Member

No description provided.

@thunder-coding thunder-coding marked this pull request as draft January 26, 2026 06:21
@thunder-coding thunder-coding mentioned this pull request Jan 26, 2026
5 tasks
@thunder-coding thunder-coding force-pushed the python313-dep8 branch 2 times, most recently from 23477e1 to cf9f843 Compare January 27, 2026 05:02
thunder-coding and others added 16 commits January 31, 2026 12:58
patch for configure is no longer needed

patch for multiprocessing.c no longer required due to
python/cpython@fa1d675

Remove 0006-do-not-use-xattr.patch since we can just add a configure
argument and it works just as well

We no longer need to manually add libraries for libpython as it is now
added by default when building for android. See upstream commit:
python/cpython@7f5e3f0

No longer required patch for Lib/aifc.py after
python/cpython@036da3b

mailcap module has been removed in Python 3.13.
https://docs.python.org/3/whatsnew/3.13.html#whatsnew313-pep594

add post install message when site-packages/ is detected for python3.12

Also mark as unsafe for on-device building. The plan is to move to building
python with host-python, this isn't possible on device. I will be
looking to get some fixes made in future to get on-device builds as
well, but it is not the priority at the moment
Causes the built libpython3.so to not include symbols which we need in
the final binary
maybe the issue with the build system is fixed now?
We need build python for cross compilation as Ubuntu's version of python
is different. Also crossenv recommends building own python revisions
instead of distribution compiled ones

added lld to setup-ubuntu as it's needed by clang driver when using
-fuse-ld=lld. Not sure how we went this far without having to deal with
this during host builds

Also we need libpython3.so for cross-compilation of some of the pip
packages. So build with --enable-shared
documentation

BREAKING CHANGE: This potentially breaks a lot of builds that might need
python with ubuntu's packaged pip packages/additional features
Do not try to use build python for running meson
This is a slightly modified version of
robotpy/crossenv@3ef761b

We only need the simple shebang, so only use that always.
Also update setuptools to 80.9.0 while we are at full rebuilds with
python 3.13
Relevant upstream commit python/cpython@1f8b24e

Also apply this same fix in host build of python as cross-python uses
it's own cutils instead of what we have built for target in our cross
builds.
…roid api version

`python -m build` builds android wheels as android_$TERMUX_ARCH.whl but
pip during installation expects it to be
android_$TERMUX_API_LEVEL_$TERMUX_ARCH.whl so we need make sure that it
is installable without renaming the wheel
[[TODO: add more descriptive commit message]]
thunder-coding and others added 6 commits January 31, 2026 15:25
ANDROID_API_LEVEL seems to be required for newer maturin versions. Also
set other environment variables used by maturin while we are at it
Also make sure we always use npm instead of using pnpm.

The hatch build process tries to build the bundle using pnpm, npm asks
for confirmation, which doesn't work with interactive terminal. CI
doesn't have stdin so it isn't a problem over there.
thunder-coding and others added 5 commits January 31, 2026 15:25
Properly build with cross-pip instead of building using build-python and
installing it. Seems like pip now treats android as a separate platform
than other linux, hence the incompatibility
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant