Skip to content

Commit 70fae8d

Browse files
authored
Merge pull request #1630 from mayeut/manylinux-interpreters
feat: use manylinux-interpreters tool if present
2 parents 7699db3 + 74c99e0 commit 70fae8d

File tree

1 file changed

+10
-0
lines changed

1 file changed

+10
-0
lines changed

cibuildwheel/linux.py

+10
Original file line numberDiff line numberDiff line change
@@ -117,10 +117,20 @@ def check_all_python_exist(
117117
*, platform_configs: Iterable[PythonConfiguration], container: OCIContainer
118118
) -> None:
119119
exist = True
120+
has_manylinux_interpreters = True
120121
messages = []
122+
123+
try:
124+
# use capture_output to keep quiet
125+
container.call(["manylinux-interpreters", "--help"], capture_output=True)
126+
except subprocess.CalledProcessError:
127+
has_manylinux_interpreters = False
128+
121129
for config in platform_configs:
122130
python_path = config.path / "bin" / "python"
123131
try:
132+
if has_manylinux_interpreters:
133+
container.call(["manylinux-interpreters", "ensure", config.path.name])
124134
container.call(["test", "-x", python_path])
125135
except subprocess.CalledProcessError:
126136
messages.append(

0 commit comments

Comments
 (0)