Skip to content

Commit c57b1df

Browse files
author
Ruben DI BATTISTA
committed
When repairing a pure python wheel, exit code should be 0
1 parent 90d382e commit c57b1df

File tree

5 files changed

+6
-6
lines changed

5 files changed

+6
-6
lines changed

Diff for: src/auditwheel/main_addtag.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ def execute(args, p):
3333
wheel_abi = analyze_wheel_abi(args.WHEEL_FILE)
3434
except NonPlatformWheel:
3535
logger.info(NonPlatformWheel.LOG_MESSAGE)
36-
return 1
36+
return 0
3737

3838
parsed_fname = WHEEL_INFO_RE.search(basename(args.WHEEL_FILE))
3939
in_fname_tags = parsed_fname.groupdict()["plat"].split(".")

Diff for: src/auditwheel/main_repair.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -127,7 +127,7 @@ def execute(args, p):
127127
wheel_abi = analyze_wheel_abi(wheel_file)
128128
except NonPlatformWheel:
129129
logger.info(NonPlatformWheel.LOG_MESSAGE)
130-
return 1
130+
return 0
131131

132132
policy = get_policy_by_name(args.PLAT)
133133
reqd_tag = policy["priority"]

Diff for: src/auditwheel/main_show.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@ def execute(args, p):
4242
winfo = analyze_wheel_abi(args.WHEEL_FILE)
4343
except NonPlatformWheel:
4444
logger.info(NonPlatformWheel.LOG_MESSAGE)
45-
return 1
45+
return 0
4646

4747
libs_with_versions = [
4848
f"{k} with versions {v}" for k, v in winfo.versioned_symbols.items()

Diff for: tests/integration/test_manylinux.py

+2-2
Original file line numberDiff line numberDiff line change
@@ -420,11 +420,11 @@ def test_build_repair_pure_wheel(self, any_manylinux_container, io_folder):
420420

421421
# Repair the wheel using the manylinux container
422422
repair_command = f"auditwheel repair --plat {policy} -w /io /io/{orig_wheel}"
423-
output = docker_exec(manylinux_ctr, repair_command, expected_retcode=1)
423+
output = docker_exec(manylinux_ctr, repair_command, expected_retcode=0)
424424
assert "This does not look like a platform wheel" in output
425425

426426
output = docker_exec(
427-
manylinux_ctr, f"auditwheel show /io/{orig_wheel}", expected_retcode=1
427+
manylinux_ctr, f"auditwheel show /io/{orig_wheel}", expected_retcode=0
428428
)
429429
assert "This does not look like a platform wheel" in output
430430

Diff for: tests/integration/test_nonplatform_wheel.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,6 @@ def test_non_platform_wheel_repair(mode):
1616
stderr=subprocess.PIPE,
1717
text=True,
1818
)
19-
assert proc.returncode == 1
19+
assert proc.returncode == 0
2020
assert "This does not look like a platform wheel" in proc.stderr
2121
assert "AttributeError" not in proc.stderr

0 commit comments

Comments
 (0)