Repository navigation
android: allow Cython 3.1, like the pyjnius recipe does - #3392
Merged
Merged
Conversation
The android recipe depends on pyjnius, so pyjnius is always built immediately before it, and both install their prerequisites into one shared hostpython site-packages. Each recipe does that with its own `pip install --upgrade` call, so pip resolves each call against that call's specifier alone: pyjnius' Cython<3.2 installs 3.1.8, then android's Cython>=0.29,<3.1 uninstalls it and downloads 3.0.12. Both bounds do admit 3.0.x, but nothing tells pip to settle there. Raise the android bound to <3.2 so the second call is a no-op. pyjnius has allowed Cython<3.2 since it moved to 1.7.0 (9774cec), while android stayed at <3.1 from its PyProjectRecipe conversion (d045912); the divergence looks incidental. The pyproject.toml bound moves with it, as that is what governs the isolated wheel build. Cython 3.1.8 cythonizes all three android extension modules, and the compile-time IF in _android.pyx still resolves per bootstrap, though it now warns that IF is deprecated and slated for removal.
AndreMiras
approved these changes
Oct 12, 2026
AndreMiras
left a comment
Member
There was a problem hiding this comment.
LGTM, thank you.
Kivy still caps Cython at 3.0.12, but I like the small focused PR.
Kivy can be addressed in a follow up
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.
The android recipe depends on pyjnius, so pyjnius is always built immediately before it, and both install their prerequisites into one shared hostpython site-packages. Each recipe does that with its own
pip install --upgradecall, so pip resolves each call against that call's specifier alone: pyjnius' Cython<3.2 installs 3.1.8, then android's Cython>=0.29,<3.1 uninstalls it and downloads 3.0.12.Raise the android bound to <3.2 so the second call is a no-op.
pyjnius has allowed Cython<3.2 since it moved to 1.7.0 (9774cec), while android stayed at <3.1 from its PyProjectRecipe conversion (d045912); the divergence looks incidental. The pyproject.toml bound moves with it, as that is what governs the isolated wheel build.
Cython 3.1.8 cythonizes all three android extension modules, and the compile-time IF in _android.pyx still resolves per bootstrap, though it now warns that IF is deprecated and slated for removal.