-
Notifications
You must be signed in to change notification settings - Fork 247
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
Improve diagnostics when auditwheel repair fails #807
Conversation
704ebf4
to
f23c006
Compare
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.
Looks fine to me except for one minor nit.
cibuildwheel/linux.py
Outdated
def matches_prepared_command(error_cmd: List[str], command_template: str) -> bool: | ||
if len(error_cmd) < 3 or error_cmd[0:2] != ["sh", "-c"]: | ||
return False | ||
command_prefix = command_template.split("{", maxsplit=1)[0].strip() | ||
return error_cmd[2].startswith(command_prefix) |
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.
Does this need to be inside another function? Is it capturing anything? If not, it really needs to be moved out. Functions-in-functions should always capture scope (and functions should not capture scope - using partials is easier to follow). It can start with an underscore to indicate its "private".
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.
Fair enough. I wrote it as a closure, mypy didn't understand it unfortunately :/.
f23c006
to
2253d0c
Compare
045588c
to
31646fb
Compare
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.
Thanks @jbarlow83 !
I just added a test for this and improved the existing test to add the counterfactual.
Fixes #793