-
-
Notifications
You must be signed in to change notification settings - Fork 3.5k
bump(scripts/build/setup/termux_setup_python_pip): setuptools 78.1.0, wheel 0.46.1 #24213
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
Conversation
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.
I'm not sure whether this will break the building of other packages. It is better to test other packages too.
Ok I will try to find all packages which depend on |
6418d77
to
3f411f0
Compare
I am not sure if I can find every single possible package that uses scripts/run-docker.sh ./build-package.sh -I -f calcurse electrum hash-slinger lv2 matplotlib nala python-brotli python-cryptography python-lxml python-pycryptodomex python-tflite-runtime python-tldp python-torch python-torchaudio python-torchvision python-xlib python-yt-dlp rdircd srt2vobsub termux-gui-package termux-gui-pm units ytui-music inkscape orca pyqt5 python-scipy python-pynvim python-pillow seafile-client speechd meld pyatspi python-pip Of all of them, there was one failure in
|
CFLAGS+=" -I${TERMUX_PYTHON_HOME}/site-packages/torch/include" | |
CFLAGS+=" -I${TERMUX_PYTHON_HOME}/site-packages/torch/include/torch/csrc/api/include" |
Simply making this change seems to make the error go away and python-torchvision
build successfully with setuptools
78.1.0.
python-torchvision
setuptools
78.1.0 compatibility patch
--- a/packages/python-torchvision/build.sh
+++ b/packages/python-torchvision/build.sh
@@ -9,8 +9,8 @@ TERMUX_PKG_DEPENDS="libc++, ffmpeg, python, python-numpy, python-pillow, python-
TERMUX_PKG_PYTHON_COMMON_DEPS="wheel, setuptools"
termux_step_pre_configure() {
- CFLAGS+=" -I${TERMUX_PYTHON_HOME}/site-packages/torch/include"
- CFLAGS+=" -I${TERMUX_PYTHON_HOME}/site-packages/torch/include/torch/csrc/api/include"
+ CXXFLAGS+=" -I${TERMUX_PYTHON_HOME}/site-packages/torch/include"
+ CXXFLAGS+=" -I${TERMUX_PYTHON_HOME}/site-packages/torch/include/torch/csrc/api/include"
CXXFLAGS+=" -DUSE_PYTHON"
LDFLAGS+=" -ltorch_cpu -ltorch_python -lc10"
I could not find any other packages that need to apply custom CXXFLAGS
or CFLAGS
in build.sh
to setuptools
.
python-pip
and python-pillow
had explicit setuptools==
.., in their TERMUX_PKG_PYTHON_COMMON_DEPS
, since the global setuptools
will be a higher version than either of those was now, is it now OK to remove the locked versions from those packages? They do not seem to have build problems when I do that.
This is a dependency for rebuilding reverse dependencies of |
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.
I haven't found any further build issues from this PR in local testing.
I'm not 100% sure I've tested all packages impacted by this though.
It turns out that this PR is now somewhat lower priority than it was a few days ago, because https://pypi.org/project/wheel/#history Because of that, I can now wait a bit longer before merging this PR, maybe 24 hours or until something else specifically needs it again. |
3f411f0
to
ad8d5f6
Compare
… wheel 0.46.1 - `wheel` version 0.46+ now requires `setuptools` version 70 or newer - discussed upstream here: pypa/wheel#660 - discovered in termux-packages here: termux#24062 (comment) - Lock `wheel` version at 0.46.1 so that if a future `wheel` update causes a similar problem in the future, it doesn't immediately propagate into termux-packages without us explicitly bumping it. Recommended by Tomjo2000 here: termux#24062 (comment) - I have confirmed that this change works to fix the build of `python-lxml` **both** - **in `TERMUX_ON_DEVICE_BUILD=false` mode (broken temporarily for 1 week)**, - fixes `error: invalid command 'bdist_wheel'` - **and also in `TERMUX_ON_DEVICE_BUILD=true` mode (broken for 6 months)**. - fixes `ModuleNotFoundError: No module named 'setuptools'` - It seems appropriate to remove the `if [ "${TERMUX_PYTHON_VERSION#*.}" -lt "12" ]` block because there is no longer any `python3.11` so it does not seem like that code is reachable anymore. - `python-torchvision` needed ajustment of its custom `CFLAGS` to be `CXXFLAGS` instead, because the newer `setuptools` is now compiling it using `aarch64-linux-android-clang++` instead of `aarch64-linux-android-clang`. - `python-pip` and `python-pillow` both had locked `setuptools` in their `TERMUX_PKG_PYTHON_COMMON_DEPS` at versions slightly newer than the old global version, now that the global version is newer than either of those, they do not seem to need that anymore.
ad8d5f6
to
4e9b8ff
Compare
As suggested here I have changed this PR to also lock |
Ok, I have not found any other packages yet that need changes to work with this, so I will merge this 24 hours from now. |
It has now been 24 hours, I'm merging this PR. |
Should consider reverting this as See also pypa/setuptools#4934. |
I bisected the problem to 4dbc002, not this PR, but if you believe that both should be reverted, then maybe you are correct, I am not sure. Shouldn't correct behavior of Note, for example, that completed successfully without encountering this problem, because, it happened before 4dbc002, despite happening after this PR (bump |
I'm not sure. But it think the shebang should get fixed in |
@licy183 I just simulated reverting this PR ( --- a/scripts/build/setup/termux_setup_python_pip.sh
+++ b/scripts/build/setup/termux_setup_python_pip.sh
@@ -62,8 +62,8 @@ termux_setup_python_pip() {
# Since 3.12, distutils is removed from python, but setuptools>=60 provides it
# Since wheel 0.46, setuptools>=70 is required to provide bdist_wheel
- build-pip install 'setuptools==78.1.0' 'wheel==0.46.1'
- cross-pip install 'setuptools==78.1.0' 'wheel==0.46.1'
+ build-pip install 'setuptools==69.5.1' 'wheel==0.45.1'
+ cross-pip install 'setuptools==69.5.1' 'wheel==0.45.1'
export PATH="${TERMUX_PYTHON_CROSSENV_PREFIX}/build/bin:${PATH}"
local _CROSS_PATH="${TERMUX_PYTHON_CROSSENV_PREFIX}/cross/bin" Rebuilding and reinstalling Only changes that consider the bisection point as 4dbc002, seem to be able to impact this bug. However, I could be wrong, if you think I have missed some part of this test, you can let me know. |
…LAGS` and `CXXFLAGS` - During termux#24213, `python-torchvision` would not build unless the include paths were added to `CXXFLAGS`, but now the package is failing to build again unless the include paths are added to `CFLAGS` also, so add the same include paths to both `CFLAGS` and `CXXFLAGS` to cover both cases.
wheel
version 0.46+ now requiressetuptools
version 70 or newerLock
wheel
version at 0.46.1 so that if a futurewheel
update causes a similar problem in the future, it doesn't immediately propagate into termux-packages without us explicitly bumping it. Recommended by Tomjo2000 here: Libxml2 rebuilds: Part 2 - Small packages #24062 (comment)I have confirmed that this change works to fix the build of
python-lxml
bothTERMUX_ON_DEVICE_BUILD=false
mode (temporarily broken for 1 week),error: invalid command 'bdist_wheel'
TERMUX_ON_DEVICE_BUILD=true
mode (broken for 6 months).ModuleNotFoundError: No module named 'setuptools'
It seems appropriate to remove the
if [ "${TERMUX_PYTHON_VERSION#*.}" -lt "12" ]
block because there is no longer anypython3.11
so it does not seem like that code is reachable anymore.python-torchvision
needed ajustment of its customCFLAGS
to beCXXFLAGS
instead, because the newersetuptools
is now compiling it usingaarch64-linux-android-clang++
instead ofaarch64-linux-android-clang
.python-pip
andpython-pillow
both had lockedsetuptools
in theirTERMUX_PKG_PYTHON_COMMON_DEPS
at versions slightly newer than the old global version, now that the global version is newer than either of those, they do not seem to need that anymore.