fix: skip incompatible extras on Android/Termux#16171
Closed
camillanapoles wants to merge 2 commits into
Closed
Conversation
Contributor
|
Closing as superseded by #22901. Triage notes (high confidence): Thanks for the contribution — the underlying problem this PR addresses has been resolved by the linked PR on current main. If you believe this was closed in error, please comment and we'll reopen. (Bulk-closed during a CLI PR triage sweep.) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Problem
hermes updatefails on Android/Termux (aarch64, Python 3.13) becausepip install -e ".[all]"hits transitive dependencies without wheels:voicectranslate2(viafaster-whisper)cp313orandroid_arm64messagingdavey(viadiscord.py[voice])matrixpython-olm(viamautrix[e2be])libolmarchived, build failsThe update process crashes during dependency resolution and the user is left with a broken installation.
Solution
Runtime detection in
hermes_cli/main.py:_android_excluded_extras()function checkssys.platform == "android"and returns the set of incompatible extras_install_python_dependencies_with_optional_fallback()uses this to build a filtered extras string instead of.[all]on AndroidDefense in depth via
pyproject.toml:sys_platform != "android"markers tovoiceextra dependenciesChanges
hermes_cli/main.py: +42 lines (new function + integration in install flow)pyproject.toml: +2 markers onvoicedepsTesting
Tested on:
pip install --dry-runwith filtered extras → exit 0, 128 packages resolvedhermes updatecompletes successfullyhermes --version→ v0.11.0 ✓Impact
_android_excluded_extras()returnsset()whensys.platform != "android"