Preserve upstream wheel Python/ABI tag (fixes abi3 wheel naming)#61
Merged
Conversation
fix_wheel was unconditionally rewriting the WHEEL Tag with `self.wheel_tag` (cp3X-cp3X-<platform>), discarding the tag maturin / the upstream backend had emitted. For abi3 crates like cryptography this turned `cp37-abi3-<platform>` into `cp312-cp312-<platform>` and the produced wheel name followed, which was wrong on three counts: - semantically incorrect: the inner _rust.abi3.so is stable-ABI; - unnecessarily restrictive: pip refuses the wheel on cp313+; - wasteful: forces per-Python-version rebuilds. Now `fix_wheel` keeps the existing pythontag-abitag portion and swaps only the platform component, falling back to self.wheel_tag only when the upstream wheel didn't carry a Tag header. Restores the cp3X-abi3-* wheels we shipped before commit 4cf1c1f.
ndonkoHenri
added a commit
to ndonkoHenri/mobile-forge
that referenced
this pull request
Jun 1, 2026
Pulls in the 5 upstream PRs that landed on python3.12: flet-dev#57 (1d84f99) recipe: pyxirr 0.10.8 flet-dev#58 (13f4958) fix(numpy): add Android `flet-libcpp-shared` host dep flet-dev#59 (37108c0) Make meta.yaml the source of truth for `build.number` flet-dev#61 (64529e7) Preserve upstream wheel Python/ABI tag in fix_wheel flet-dev#62 (2f6ce8f) fix(pyyaml): bundle the _yaml C accelerator via new flet-libyaml recipe Conflict resolution Most files auto-merged cleanly — this branch had been carrying the same recipe changes in parallel with flet-dev#58 / flet-dev#62 / flet-dev#57, so flet-dev#59's per-recipe `build.number:` additions slotted into our richer versions without overlap. Eight files needed manual resolution; all followed the same shape (keep this branch's richer context, add flet-dev#59's build.number): recipes/greenlet/meta.yaml take flet-dev#59's lifted `build:` block (number out of the Jinja conditional), keep this branch's libcpp host-dep requirements block recipes/pycryptodome/meta.yaml keep this branch's RTLD_LOCAL recipes/pycryptodomex/meta.yaml explanatory comment block, add `build: number: 4` recipes/pyobjus/meta.yaml keep `platforms: [ios]` gate, add `build: number: 1` recipes/pyxirr/meta.yaml just add `build: number: 1` recipes/pyxirr/test_pyxirr.py take flet-dev#57's irr+xirr coverage (tighter assertions than this branch's cherry-pick had) recipes/pyyaml/meta.yaml add `build: number: 5`, keep this branch's flet-libyaml dep .github/workflows/build-wheels.yml keep this branch's elaborate matrix logic (read recipe meta + platforms filter + version+ build display name) but drop the now-removed BUILD_NUMBER references — recipe meta is the single source of truth, exactly what flet-dev#59 intended Also tightens a pre-existing Jinja nesting bug in recipes/pillow/meta.yaml (an outer `# {% if sdk != 'android' %}` was missing its `# {% endif %}`, breaking template rendering on both archs). All 80 meta.yaml files now render + YAML-parse cleanly under both android + iOS sdk contexts.
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.
Summary
fix_wheelwas unconditionally rewriting theWHEELmetadata Tag withself.wheel_tag(cp3X-cp3X-<platform>), discarding the tag maturin / the upstream build backend had emitted. For abi3 crates like cryptography this turnedcp37-abi3-<platform>intocp312-cp312-<platform>, and the produced wheel filename followed (sincewheel packderives the name from the Tag).Visible on
pypi.flet.devtoday:cryptography-43.0.1-1-cp37-abi3-android_24_*.whl✓cryptography-43.0.1-4-cp312-cp312-android_24_*.whl✗The regression came in with 4cf1c1f (GHA for Python 3.12 #46) — the "Normalize wheel tags…" sub-commit that introduced
PythonPackageBuilder.wheel_tagand started clobbering the upstream Tag infix_wheel.Why the old tagging was wrong
_rust.abi3.sois stable-ABI; the wheel claimed cp312-specific.cp312-cp312wheels on Python 3.13+, even though the binary would work.The fix
In
Builder.fix_wheel, keep the existingpythontag-abitagpart from the upstream WHEEL Tag and swap only the platform component withself.cross_venv.tag. Fall back toself.wheel_tagonly when the upstream wheel didn't carry a Tag header.Behavior summary
cp37-abi3-linux_x86_64cp312-cp312-android_24_arm64_v8a✗cp37-abi3-android_24_arm64_v8a✓cp312-cp312-linux_x86_64cp312-cp312-android_24_arm64_v8acp312-cp312-android_24_arm64_v8a(unchanged)cp312-cp312-linux_x86_64cp312-cp312-android_24_arm64_v8acp312-cp312-android_24_arm64_v8a(unchanged)Test plan
cryptography-43.0.1-N-cp37-abi3-android_24_arm64_v8a.whl*.dist-info/WHEELand confirm theTag:line matches the filename🤖 Generated with Claude Code