Skip to content

Commit 95567da

Browse files
committed
tools: Update audit_wheel_wrapper to work with recent versions
Looks like old way of patching no longer worked so patch the `platform.machine` again.
1 parent 145e8cc commit 95567da

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

tools/audit_wheel_wrapper.py

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,15 +10,17 @@
1010

1111
def main(arch: str, wrapped_args: list[str]) -> None:
1212
with patch("sys.argv", [""] + wrapped_args), patch(
13-
"auditwheel.policy.get_arch_name", return_value=arch
13+
"platform.machine", return_value=arch
1414
):
1515
auditwheel_main()
1616

1717

1818
if __name__ == "__main__":
1919
arg_parse = ArgumentParser()
2020
arg_parse.add_argument(
21-
"--arch", choices=("x86_64", "i686", "aarch64", "armv7l"), default="x86_64"
21+
"--arch",
22+
choices=("x86_64", "i686", "aarch64", "armv7l"),
23+
default="x86_64",
2224
)
2325
arg_parse.add_argument("wrapped_args", nargs="*")
2426

0 commit comments

Comments
 (0)