Skip to content

Commit a0350fa

Browse files
committed
fix: python-platfrom on uv is different
Signed-off-by: Henry Schreiner <[email protected]>
1 parent 1f1db32 commit a0350fa

File tree

1 file changed

+13
-2
lines changed

1 file changed

+13
-2
lines changed

cibuildwheel/platforms/android.py

Lines changed: 13 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -593,15 +593,26 @@ def test_wheel(state: BuildState, wheel: Path, *, build_frontend: str) -> None:
593593
env=state.build_env,
594594
)
595595

596+
platform_args = (
597+
[
598+
"--python-platforma",
599+
"x86_64-linux-android" if state.config.arch == "x86_64" else "aarch64-linux-android",
600+
]
601+
if use_uv
602+
else [
603+
"--platform",
604+
sysconfig_print("get_platform()", state.android_env).replace("-", "_"),
605+
]
606+
)
607+
596608
# Install the wheel and test-requires.
597609
site_packages_dir = state.build_path / "site-packages"
598610
site_packages_dir.mkdir()
599611
call(
600612
*pip,
601613
"install",
602614
"--only-binary=:all:",
603-
"--python-platform" if use_uv else "--platform",
604-
sysconfig_print("get_platform()", state.android_env).replace("-", "_"),
615+
*platform_args,
605616
"--target",
606617
site_packages_dir,
607618
f"{wheel}{state.options.test_extras}",

0 commit comments

Comments
 (0)