Conversation
Fixes an NDK/libc++ build failure (missing <unordered_map> include) present in v2.3.0's meson build. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
The cryptography-cffi Rust crate's build.rs needs the *target* Python's include dir to compile the cffi-generated _openssl.c, and needs a working C compiler for its target. Two fixes to RustCompiledComponentsRecipe make this work generally, not just for cryptography: - get_recipe_env() now also sets a per-target CC_/AR_ pair (in addition to the existing CARGO_TARGET_*_LINKER): crates using the `cc` crate in their build.rs fall back to guessing --target= from the Rust triple without it, which for some targets (e.g. armv7-linux-androideabi) produces an invalid triple, picking up the wrong <limits.h> and breaking CPython's LONG_BIT sanity check in pyport.h. - MesonRecipe.ensure_args() no longer mutates the inherited class-level extra_build_args list in place, which would otherwise bleed one recipe's meson cross-file args into unrelated PyProjectRecipe subclasses sharing the same class attribute. cryptography's own recipe gets a small patch (via a new P4A_PYTHON_INCLUDE_DIR env var read from build.rs) to prefer the target's include dir over introspecting the host Python for it. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
…layouts The glob only matched one of the two directory layouts different NDK versions use, raising a bare IndexError when it found nothing instead of a clear BuildInterruptingException. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
vosk imports srt unconditionally (not just from its optional CLI
tool), and srt has no wheel on PyPI -- without a recipe of its own it
was silently dropped, and the app crashed at runtime with
ModuleNotFoundError. Same story for wikipedia, a plain build blocker
(pip install has nothing to build it with, no wheel on PyPI either).
vosk also needed:
- open_dll() patched to recognize sys.platform == "android" (only
"linux" and a few others were recognized, so vosk's own bundled
native library loader didn't find itself on Android)
- --upgrade --force-reinstall on its own pip install step, since a
`pip install .` with a stale but present install can otherwise no-op
("Requirement already satisfied") instead of picking up a rebuild.
Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
New recipes: bitstring, libonnxruntime, lifxlan, MarkupSafe, materialshapes, meteofrance-api, mpmath, murmurhash, onnxruntime, preshed, pydantic, pywizlight, sherpa-ncnn, sherpa-onnx, simplemma, spacy, srsly, sympy, thinc, tibs, kivymd, blis, cymem, jsonschema. Updates: freetype-py (fall back to distutils when needed), liblzma, pycairo (meson patch), regex -- version/patch bumps picked up while building an app against this set of recipes. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
Per review feedback: these packages all ship a universal (py3-none-any)
wheel and have no dependencies that themselves need native compilation
or lack a wheel, so a p4a recipe adds nothing over just listing them in
an app's requirements (or another recipe's python_depends) -- they get
pip-installed exactly like `colorama`, `certifi`, `idna`, `urllib3` etc.
already are.
materialshapes, meteofrance-api, mpmath, pydantic, pywizlight,
simplemma, sympy, tibs
pydantic-core (the compiled Rust part pydantic itself pins) already has
its own recipe; tibs was only ever a speculative companion to a newer
bitstring version this doesn't use (see below), nothing depends on it.
Kept as recipes, despite also having universal wheels themselves,
because their own dependency chain includes something that doesn't:
- jsonschema -- needs rpds-py, which is Rust-compiled with no
universal wheel and no recipe of its own yet.
- bitstring -- current PyPI releases need bitarray and tibs, both
compiled; pinning the last version that doesn't (3.1.9) is this
recipe's whole point, not building anything.
- lifxlan -- pulls in bitstring unconstrained; without a recipe (or
without --no-deps carving an explicit exception) pip would resolve
a bitstring version needing a bitarray build that doesn't work
here, exactly the crash this was hit and fixed for while building
the app this PR is drawn from.
Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
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.
No description provided.