Skip to content

Commit

Permalink
Merge pull request #1630 from mayeut/manylinux-interpreters
Browse files Browse the repository at this point in the history
feat: use manylinux-interpreters tool if present
  • Loading branch information
joerick committed Oct 3, 2023
2 parents 7699db3 + 74c99e0 commit 70fae8d
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions cibuildwheel/linux.py
Original file line number Diff line number Diff line change
Expand Up @@ -117,10 +117,20 @@ def check_all_python_exist(
*, platform_configs: Iterable[PythonConfiguration], container: OCIContainer
) -> None:
exist = True
has_manylinux_interpreters = True
messages = []

try:
# use capture_output to keep quiet
container.call(["manylinux-interpreters", "--help"], capture_output=True)
except subprocess.CalledProcessError:
has_manylinux_interpreters = False

for config in platform_configs:
python_path = config.path / "bin" / "python"
try:
if has_manylinux_interpreters:
container.call(["manylinux-interpreters", "ensure", config.path.name])
container.call(["test", "-x", python_path])
except subprocess.CalledProcessError:
messages.append(
Expand Down

0 comments on commit 70fae8d

Please sign in to comment.