feat: add armv7l in auto_archs when running on aarch64 (#2259)
* feat: add armv7l in auto_archs when running on aarch64 This depends on aarch32 EL0 support and thus is done conditionally. * ci(travis): move to Ubuntu 22.04 / cp312
This commit is contained in:
+18
-3
@@ -18,6 +18,7 @@ from typing import Any, Final
|
||||
import pytest
|
||||
|
||||
from cibuildwheel.architecture import Architecture
|
||||
from cibuildwheel.ci import CIProvider, detect_ci_provider
|
||||
from cibuildwheel.util.file import CIBW_CACHE_PATH
|
||||
|
||||
EMULATED_ARCHS: Final[list[str]] = sorted(
|
||||
@@ -25,6 +26,11 @@ EMULATED_ARCHS: Final[list[str]] = sorted(
|
||||
)
|
||||
SINGLE_PYTHON_VERSION: Final[tuple[int, int]] = (3, 12)
|
||||
|
||||
_AARCH64_CAN_RUN_ARMV7: Final[bool] = Architecture.aarch64.value not in EMULATED_ARCHS and {
|
||||
None: Architecture.armv7l.value not in EMULATED_ARCHS,
|
||||
CIProvider.travis_ci: False,
|
||||
}.get(detect_ci_provider(), True)
|
||||
|
||||
platform = os.environ.get("CIBW_PLATFORM", "")
|
||||
if platform:
|
||||
pass
|
||||
@@ -173,7 +179,7 @@ def expected_wheels(
|
||||
machine_arch = "aarch64"
|
||||
|
||||
if manylinux_versions is None:
|
||||
if machine_arch == "armv7l":
|
||||
if machine_arch in ("armv7l", "aarch64"):
|
||||
manylinux_versions = ["manylinux_2_17", "manylinux2014", "manylinux_2_31"]
|
||||
elif machine_arch == "x86_64":
|
||||
manylinux_versions = [
|
||||
@@ -252,14 +258,23 @@ def expected_wheels(
|
||||
if platform == "linux":
|
||||
architectures = [arch_name_for_linux(machine_arch)]
|
||||
|
||||
if machine_arch == "x86_64" and not single_arch:
|
||||
architectures.append("i686")
|
||||
if not single_arch:
|
||||
if machine_arch == "x86_64":
|
||||
architectures.append("i686")
|
||||
elif (
|
||||
machine_arch == "aarch64"
|
||||
and sys.platform.startswith("linux")
|
||||
and not python_abi_tag.startswith("pp")
|
||||
and _AARCH64_CAN_RUN_ARMV7
|
||||
):
|
||||
architectures.append("armv7l")
|
||||
|
||||
if len(manylinux_versions) > 0:
|
||||
platform_tags = [
|
||||
".".join(
|
||||
f"{manylinux_version}_{architecture}"
|
||||
for manylinux_version in manylinux_versions
|
||||
if (manylinux_version, architecture) != ("manylinux_2_31", "aarch64")
|
||||
)
|
||||
for architecture in architectures
|
||||
]
|
||||
|
||||
Reference in New Issue
Block a user