Skip to content

android: allow Cython 3.1, like the pyjnius recipe does - #3392

Merged
AndreMiras merged 1 commit into
kivy:developfrom
f321x:202610_android_cython_bound
Oct 12, 2026
Merged

AndreMiras merged 1 commit into
kivy:developfrom
f321x:202610_android_cython_bound

Conversation

@f321x

@f321x f321x commented Oct 12, 2026

Copy link
Copy Markdown
Contributor

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.

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.

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 AndreMiras self-assigned this Oct 12, 2026
@coveralls

Copy link
Copy Markdown

Coverage Status

coverage: 63.235%. remained the same — f321x:202610_android_cython_bound into kivy:develop

@AndreMiras AndreMiras left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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

@AndreMiras
AndreMiras merged commit 944fb72 into kivy:develop Oct 12, 2026
38 checks passed
@f321x
f321x deleted the 202610_android_cython_bound branch October 12, 2026 10:59
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.

3 participants