Conversation
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #643 +/- ##
==========================================
+ Coverage 95.34% 95.76% +0.41%
==========================================
Files 22 23 +1
Lines 1870 1935 +65
Branches 355 367 +12
==========================================
+ Hits 1783 1853 +70
+ Misses 48 46 -2
+ Partials 39 36 -3 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
|
Yes, in fact my desktop machine uses macOS, so I used it for almost all of my testing. I guess this means we should add a CI job for that platform as well, but I'll wait for your review before I deal with that. |
There was a problem hiding this comment.
Pull request overview
This PR extends auditwheel to support auditing/repairing Android wheels (PEP 738) in cross-compilation scenarios, primarily by allowing library discovery via an explicit sysroot search path rather than the build machine’s default linker paths.
Changes:
- Add Android as a supported libc/policy target (new
android-policy.json, Android-awareWheelPoliciesbehavior). - Introduce
--ldpathsto control external library search paths (used byshow,repair, andlddtree). - Update grafting/patching behavior to better support Android RUNPATH semantics; add unit + integration tests and Android fixture wheels/libs.
Reviewed changes
Copilot reviewed 26 out of 29 changed files in this pull request and generated 3 comments.
Show a summary per file
| File | Description |
|---|---|
src/auditwheel/libc.py |
Adds Libc.ANDROID and a tag_prefix mapping for platform tag detection. |
src/auditwheel/policy/__init__.py |
Loads Android policy JSON and selects appropriate policy based on wheel API level tag; Android-specific external ref filtering. |
src/auditwheel/policy/android-policy.json |
Defines Android library whitelists for selected API levels. |
src/auditwheel/options.py |
Centralizes shared CLI options; adds --ldpaths. |
src/auditwheel/lddtree.py |
Adds --ldpaths parsing/handling and improves $ORIGIN expansion rules. |
src/auditwheel/wheel_abi.py |
Plumbs --ldpaths into ELF analysis and ensures Android analysis doesn’t implicitly use host linker paths. |
src/auditwheel/main_show.py / src/auditwheel/main_repair.py / src/auditwheel/main_lddtree.py |
Wires --ldpaths into subcommands; adjusts repair flow for new patcher behavior. |
src/auditwheel/patcher.py |
Makes patchelf behavior platform-aware (Android RUNPATH handling + API-level restriction). |
src/auditwheel/repair.py |
Sets $ORIGIN rpath/runpath on grafted libraries unconditionally. |
src/auditwheel/wheeltools.py |
Adds helpers for platform tag extraction and Android API parsing; updates libc/arch detection accordingly. |
src/auditwheel/architecture.py |
Adds arm64_v8a and normalizes to baseline aarch64. |
src/auditwheel/elfutils.py |
Adds SONAME reader helper. |
Tests (tests/unit/*, tests/integration/*) |
Adds Android coverage, --ldpaths coverage, and fixtures for Android wheel repair behavior. |
README.rst |
Updates messaging to include Android wheels and notes macOS as a potential host for Android wheel work. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
mayeut
left a comment
There was a problem hiding this comment.
Just a couple questions/suggestions remain
I think we're almost there, thanks.
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 28 out of 31 changed files in this pull request and generated 1 comment.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
This will be used by cibuildwheel to replace its limited built-in support for adding external libraries to an Android wheel.
This involves cross-compilation, but it doesn't have much of an overlap with #512. It adds the
--ldpathsoption, which allows auditwheel to search an arbitrary sysroot, rather than the build machine's own libraries.