-
Notifications
You must be signed in to change notification settings - Fork 160
feat: allow "repairing" pure python wheel #660
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
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull request overview
This PR adds a new --allow-pure-python-wheel flag that allows auditwheel to process pure Python wheels (wheels with no platform-specific binaries) without returning an error. By default, auditwheel still returns an error for pure Python wheels to maintain backward compatibility, but users can now opt-in to allow them.
Key changes:
- Added
--allow-pure-python-wheelcommand-line flag to bothshowandrepaircommands - For
repairmode with the flag enabled, pure Python wheels are copied to the output directory unchanged - Added comprehensive test coverage for the new functionality including edge cases
Reviewed changes
Copilot reviewed 3 out of 3 changed files in this pull request and generated 6 comments.
| File | Description |
|---|---|
| tests/integration/test_nonplatform_wheel.py | Added new test test_non_platform_wheel_pure_allow to verify pure Python wheel handling with the new flag; parametrized existing tests to ensure the flag doesn't affect non-pure-Python error cases |
| src/auditwheel/main_show.py | Added --allow-pure-python-wheel argument; tracks whether a wheel is pure Python and returns success (0) when the flag is set for pure Python wheels |
| src/auditwheel/main_repair.py | Added --allow-pure-python-wheel argument; copies pure Python wheels to the output directory unchanged when the flag is set, using samefile() check to avoid unnecessary copying |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #660 +/- ##
==========================================
+ Coverage 95.20% 95.24% +0.03%
==========================================
Files 22 22
Lines 1815 1829 +14
Branches 340 343 +3
==========================================
+ Hits 1728 1742 +14
Misses 48 48
Partials 39 39 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull request overview
Copilot reviewed 3 out of 3 changed files in this pull request and generated no new comments.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
The default behaviour still returns an error but this can now be overridden.
close #438