-
-
Notifications
You must be signed in to change notification settings - Fork 3.8k
bump(main/python): 3.13 #27739
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: master
Are you sure you want to change the base?
bump(main/python): 3.13 #27739
Conversation
| TERMUX_PKG_PROVIDES="python3" | ||
|
|
||
| # https://github.com/termux/termux-packages/issues/15908 | ||
| TERMUX_PKG_MAKE_PROCESSES=1 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
For convenient reference, here is the series of commands which need to work consistently (no matter how many times they are repeated, even if repeated many times) when this is removed:
ssh -p 8022 192.168.12.185 # termux device ip address
rm -rf output
exit
rm -rf output
scripts/run-docker.sh ./build-package.sh -I -f python
scp -r -P 8022 output/ 192.168.12.185:~
ssh -p 8022 192.168.12.185
cd output/
apt reinstall ./*.deb
python -c "import _random"
exit
Wonderful! I had been planning to do this, but only after finishing my current python PR. My current python PR is still not finished, so you can feel free to work on this. Is there any specific reason this isn't the newest version, 3.14.2? |
I assume that python 3.14 might have some breaking changes that might not be suitable for everyone yet. Will upgrade to 3.13 now, then will target 3.14 in the next few months. I'm targeting python 3.13 by mid-January. |
e304736 to
6c9ed54
Compare
packages/python/build.sh
Outdated
| # https://github.com/termux/termux-packages/issues/15908 | ||
| TERMUX_PKG_MAKE_PROCESSES=1 | ||
| # Python build is a 2-step process. Requiring host build and cross build | ||
| TERMUX_PKG_ON_DEVICE_BUILD_NOT_SUPPORTED=false |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Could you explain more about the justification for this change?
In my PR
I have on-device build of Python implemented, it does require Python to already be installed, but that applies to all Termux packages, because if Python is not installed already when building Termux packages, then buildorder.py does not work so no packages can be built.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Currently my priority is not on-device builds. I want to first fix docker builds. I'll be reverting this once testing is done on-device and on termux-docker for CI builds of python. And that was supposed to be TERMUX_PKG_ON_DEVICE_BUILD_NOT_SUPPORTED=true
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Note also:
falseis the default value ofTERMUX_PKG_ON_DEVICE_BUILD_NOT_SUPPORTED, so this line as written doesn't do anything, which might not be what you were initially intendingTERMUX_PKG_ON_DEVICE_BUILD_NOT_SUPPORTED=trueis intended specifically for packages that edit files during the build that will not be tracked by the same package in the package manager, for example,qt6-qtwebengineisTERMUX_PKG_ON_DEVICE_BUILD_NOT_SUPPORTED=truebecause it edits the file$TERMUX_PREFIX/lib/librt.soduring the build, which is a file normally tracked by the packagendk-sysroot. Does that situation apply to thispythonin some way?
| rm $TERMUX_PREFIX/lib/lib{{pthread,resolv}.a,rt.so} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Currently my priority is not on-device builds. I want to first fix docker builds. I'll be reverting this once testing is done
Thanks for explaining, I didn't see your response before posting my next message. I just wanted to let you know that TERMUX_PKG_ON_DEVICE_BUILD_NOT_SUPPORTED=true is not intended to be used with packages that are just untested or harmlessly broken for building on-device - it is intended specifically for packages that have been tested and found to be harmfully broken for building on-device, which is a detail that is unfortunately not clearly documented in Termux.
Python 3.13 Upstream Android support (PEP738) test notes
Test 1:
|
|
Thanks for the brief. I havent started testing yet. Just pushed the changed I had for proper cross-compilation I has been holding since some time. Will be busy this month with some stuff. Wont be moving ahead without running tests for Python |
c571932 to
e28b038
Compare
| make -j "$(nproc)" install | ||
| cd .. | ||
| # Add our own built python to path | ||
| export PATH="$_PYTHON_FOLDER/host-build-prefix/bin:$PATH" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Oh I'm sorry I forgot to tell you that this line needs to be outside of the if [[ ! -d "$_PYTHON_FOLDER" ]]; then block otherwise there will be an error when repeated builds are performed
I noticed that yesterday and I thought I told you but I forgot to
b43981f to
8a0acfd
Compare
8a0acfd to
55b54bb
Compare
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
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
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.
55b54bb to
6247dbc
Compare
Requires some additional work, so don't get too excited.
DEFINITELY NOT READY FOR REVIEW. EXPECT A LOT OF SILLY COMMITS TO HAUNT YOU IN YOUR NOTIFICATIONS IF YOU ARE REVIEWING THIS PR AT THIS STAGE
The following is the significant part that needs to be done first:
Since nobody seems to have touched this, I am also thinking of taking up maintainership of python. Will try to keep this up to date with full test coverage
Packages that need to be rebuilt and tested:
Rebuild Part 1 #27768
Rebuild Part 2 #27777
Additional packages that have python3.xx/site-packages as found using apt-file:
List generated using modified version of `scripts/generate-apt-packages-list.sh`: