feat: initial support for riscv64 (#2366)
* feat: initial support for riscv64 * use enable for riscv64 * Apply review suggestion Co-authored-by: Joe Rickerby <joerick@mac.com> * update documentation --------- Co-authored-by: Joe Rickerby <joerick@mac.com>
This commit is contained in:
co-authored by
Joe Rickerby
parent
0463d26066
commit
5f8d06ff55
@@ -158,6 +158,15 @@ def test_build_free_threaded_python():
|
||||
assert build_selector("cp313t-manylinux_x86_64")
|
||||
|
||||
|
||||
def test_build_riscv64_enable():
|
||||
build_selector = BuildSelector(build_config="*", skip_config="")
|
||||
assert not build_selector("cp313-manylinux_riscv64")
|
||||
build_selector = BuildSelector(
|
||||
build_config="*", skip_config="", enable=frozenset([EnableGroup.CPythonExperimentalRiscV64])
|
||||
)
|
||||
assert build_selector("cp313-manylinux_riscv64")
|
||||
|
||||
|
||||
def test_testing_selector():
|
||||
# local import to avoid pytest trying to collect this as a test class!
|
||||
from cibuildwheel.selector import TestSelector
|
||||
|
||||
@@ -179,6 +179,7 @@ def test_archs_platform_all(platform, intercepted_build_args, monkeypatch):
|
||||
Architecture.ppc64le,
|
||||
Architecture.s390x,
|
||||
Architecture.armv7l,
|
||||
Architecture.riscv64,
|
||||
}
|
||||
elif platform == "windows":
|
||||
assert options.globals.architectures == {
|
||||
|
||||
@@ -552,7 +552,7 @@ def test_local_image(
|
||||
# both GHA & local macOS arm64 podman desktop are failing
|
||||
pytest.xfail("podman fails with armv7l images")
|
||||
|
||||
remote_image = "debian:12-slim"
|
||||
remote_image = "debian:trixie-slim"
|
||||
platform_name = platform.value.replace("/", "_")
|
||||
local_image = f"cibw_{container_engine.name}_{platform_name}_local:latest"
|
||||
dockerfile = tmp_path / "Dockerfile"
|
||||
@@ -582,7 +582,7 @@ def test_multiarch_image(container_engine, platform):
|
||||
# both GHA & local macOS arm64 podman desktop are failing
|
||||
pytest.xfail("podman fails with armv7l images")
|
||||
with OCIContainer(
|
||||
engine=container_engine, image="debian:12-slim", oci_platform=platform
|
||||
engine=container_engine, image="debian:trixie-slim", oci_platform=platform
|
||||
) as container:
|
||||
output = container.call(["uname", "-m"], capture_output=True)
|
||||
output_map_kernel = {
|
||||
@@ -591,6 +591,7 @@ def test_multiarch_image(container_engine, platform):
|
||||
OCIPlatform.ARMV7: ("armv7l", "armv8l"),
|
||||
OCIPlatform.ARM64: ("aarch64",),
|
||||
OCIPlatform.PPC64LE: ("ppc64le",),
|
||||
OCIPlatform.RISCV64: ("riscv64",),
|
||||
OCIPlatform.S390X: ("s390x",),
|
||||
}
|
||||
assert output.strip() in output_map_kernel[platform]
|
||||
@@ -601,6 +602,7 @@ def test_multiarch_image(container_engine, platform):
|
||||
OCIPlatform.ARMV7: "armhf",
|
||||
OCIPlatform.ARM64: "arm64",
|
||||
OCIPlatform.PPC64LE: "ppc64el",
|
||||
OCIPlatform.RISCV64: "riscv64",
|
||||
OCIPlatform.S390X: "s390x",
|
||||
}
|
||||
assert output_map_dpkg[platform] == output.strip()
|
||||
|
||||
Reference in New Issue
Block a user