Skip to content

Commit

Permalink
fix: error message when manylinux-interpreters ensure ... failed (o…
Browse files Browse the repository at this point in the history
…ption b)
  • Loading branch information
mayeut committed Nov 2, 2024
1 parent 18e3f67 commit df7ef53
Showing 1 changed file with 10 additions and 12 deletions.
22 changes: 10 additions & 12 deletions cibuildwheel/linux.py
Original file line number Diff line number Diff line change
Expand Up @@ -144,25 +144,23 @@ def check_all_python_exist(

for config in platform_configs:
python_path = config.path / "bin" / "python"
ensure_failed = False
try:
if has_manylinux_interpreters:
try:
container.call(["manylinux-interpreters", "ensure", config.path.name])
except subprocess.CalledProcessError:
ensure_failed = True
container.call(["test", "-x", python_path])
except subprocess.CalledProcessError:
if ensure_failed:
if has_manylinux_interpreters:
try:
container.call(["manylinux-interpreters", "ensure", config.path.name])
except subprocess.CalledProcessError:
messages.append(
f" 'manylinux-interpreters ensure {config.path.name}' needed to build '{config.identifier}' failed in container running image '{container.image}'."
" Either the installation failed or this interpreter is not available in that image. Please check the logs."
)
else:
exist = False
else:
try:
container.call(["test", "-x", python_path])
except subprocess.CalledProcessError:
messages.append(
f" '{python_path}' executable doesn't exist in image '{container.image}' to build '{config.identifier}'."
)
exist = False
exist = False
if not exist:
message = "\n".join(messages)
raise errors.FatalError(message)
Expand Down

0 comments on commit df7ef53

Please sign in to comment.