Skip to content

Commit ef267f0

Browse files
committed
fix: update cibuildwheel.linux.troubleshoot to know about python -m pip wheel
1 parent 2e52bf2 commit ef267f0

File tree

2 files changed

+4
-3
lines changed

2 files changed

+4
-3
lines changed

cibuildwheel/linux.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -310,7 +310,8 @@ def build(options: BuildOptions) -> None:
310310

311311
def troubleshoot(package_dir: Path, error: Exception) -> None:
312312
if isinstance(error, subprocess.CalledProcessError) and (
313-
error.cmd[0:2] == ["pip", "wheel"] or error.cmd[0:3] == ["python", "-m", "build"]
313+
error.cmd[0:4] == ["python", "-m", "pip", "wheel"]
314+
or error.cmd[0:3] == ["python", "-m", "build"]
314315
):
315316
# the 'pip wheel' step failed.
316317
print("Checking for common errors...")

test/test_troubleshooting.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,15 +16,15 @@
1616
"""
1717

1818

19-
def test_failed_project_with_so_files(tmp_path, capfd):
19+
def test_failed_project_with_so_files(tmp_path, capfd, build_mode):
2020
if utils.platform != "linux":
2121
pytest.skip("this test is only relevant to the linux build")
2222

2323
project_dir = tmp_path / "project"
2424
so_file_project.generate(project_dir)
2525

2626
with pytest.raises(subprocess.CalledProcessError):
27-
utils.cibuildwheel_run(project_dir)
27+
utils.cibuildwheel_run(project_dir, add_env=build_mode)
2828

2929
captured = capfd.readouterr()
3030
print("out", captured.out)

0 commit comments

Comments
 (0)