Merge pull request #1630 from mayeut/manylinux-interpreters
feat: use manylinux-interpreters tool if present
This commit is contained in:
@@ -117,10 +117,20 @@ def check_all_python_exist(
|
|||||||
*, platform_configs: Iterable[PythonConfiguration], container: OCIContainer
|
*, platform_configs: Iterable[PythonConfiguration], container: OCIContainer
|
||||||
) -> None:
|
) -> None:
|
||||||
exist = True
|
exist = True
|
||||||
|
has_manylinux_interpreters = True
|
||||||
messages = []
|
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:
|
for config in platform_configs:
|
||||||
python_path = config.path / "bin" / "python"
|
python_path = config.path / "bin" / "python"
|
||||||
try:
|
try:
|
||||||
|
if has_manylinux_interpreters:
|
||||||
|
container.call(["manylinux-interpreters", "ensure", config.path.name])
|
||||||
container.call(["test", "-x", python_path])
|
container.call(["test", "-x", python_path])
|
||||||
except subprocess.CalledProcessError:
|
except subprocess.CalledProcessError:
|
||||||
messages.append(
|
messages.append(
|
||||||
|
|||||||
Reference in New Issue
Block a user