Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add ability to repair wheels for other architectures #512

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

rhelmot
Copy link

@rhelmot rhelmot commented Aug 23, 2024

#244 represents a problem in need of a solution - how to audit wheels for other architectures, e.g. those built with a cross toolchain? Not all build environments can set up binfmt_misc or are performant enough to build in a VM.

Here is a proposed solution: manually specifying the architecture for the wheels to patch. I have verified that this is able to repair wheels built for aarch64 using a cross toolchain on an x86_64 machine.

@mayeut
Copy link
Member

mayeut commented Aug 24, 2024

I think the arch shall be deduced from the input wheel. The information is already there, there should be no need to ask the user for input.

Copy link

codecov bot commented Aug 24, 2024

Codecov Report

Attention: Patch coverage is 30.00000% with 7 lines in your changes missing coverage. Please review.

Project coverage is 91.43%. Comparing base (f3025f2) to head (a3224fa).

Files Patch % Lines
src/auditwheel/main_repair.py 30.00% 6 Missing and 1 partial ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main     #512      +/-   ##
==========================================
- Coverage   92.33%   91.43%   -0.91%     
==========================================
  Files          20       20              
  Lines        1266     1272       +6     
  Branches      305      281      -24     
==========================================
- Hits         1169     1163       -6     
- Misses         56       63       +7     
- Partials       41       46       +5     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@rhelmot rhelmot force-pushed the main branch 4 times, most recently from ff461c8 to d0ea4fb Compare August 26, 2024 19:09
@rhelmot
Copy link
Author

rhelmot commented Aug 26, 2024

This was a much more difficult refactor with this requirement but it has been done. I tried to stay true to the original intent as much as possible but the wheel policies stuff was really, really insistent that it should be able to know exactly what platform it's running for at all times.

In order to streamline a common use case ("please repair my wheel; I don't care what you repair it to but it doesn't necessarily have to be the highest-priority policy for the given platform"), I added the repair --best-plat flag.

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.

2 participants