fix(android): execute wheel via sys.executable (#2515)

* Android: execute `wheel` via `sys.executable`

* Suppress unhelpful cyclic-import warning
This commit is contained in:
Malcolm Smith
2025-07-24 16:38:22 -04:00
committed by GitHub
parent 9361af3204
commit 302af02853
+3 -2
View File
@@ -6,6 +6,7 @@ import re
import shlex import shlex
import shutil import shutil
import subprocess import subprocess
import sys
from collections.abc import Iterable, Iterator from collections.abc import Iterable, Iterator
from dataclasses import dataclass from dataclasses import dataclass
from os.path import relpath from os.path import relpath
@@ -21,7 +22,7 @@ from elftools.common.exceptions import ELFError
from elftools.elf.elffile import ELFFile from elftools.elf.elffile import ELFFile
from filelock import FileLock from filelock import FileLock
from .. import errors, platforms from .. import errors, platforms # pylint: disable=cyclic-import
from ..architecture import Architecture, arch_synonym from ..architecture import Architecture, arch_synonym
from ..frontend import get_build_frontend_extra_flags, parse_config_settings from ..frontend import get_build_frontend_extra_flags, parse_config_settings
from ..logger import log from ..logger import log
@@ -517,7 +518,7 @@ def repair_default(
f"${{ORIGIN}}/{relpath(libs_dir, path.parent)}", f"${{ORIGIN}}/{relpath(libs_dir, path.parent)}",
path, path,
) )
call("wheel", "pack", unpacked_dir, "-d", repaired_wheel_dir) call(sys.executable, "-m", "wheel", "pack", unpacked_dir, "-d", repaired_wheel_dir)
def elf_file_filter(paths: Iterable[Path]) -> Iterator[tuple[Path, ELFFile]]: def elf_file_filter(paths: Iterable[Path]) -> Iterator[tuple[Path, ELFFile]]: