Skip to content

Commit

Permalink
feat: use manylinux-interpreters tool if present
Browse files Browse the repository at this point in the history
This will allow dropping some EOL (and maybe some none EOL) python interpreters in manylinux images which would allow to reduce its size (faster for a vast majority of user, a small slow-down for users of those interpreters).
  • Loading branch information
mayeut committed Oct 1, 2023
1 parent 8624892 commit 74c99e0
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 74c99e0

Please sign in to comment.