Skip to content

Commit 1b7a792

Browse files
committed
gh-145616: Detect Android sysconfig ABI correctly on 32-bit ARM Android on 64-bit ARM kernel
- When Python is running on 32-bit ARM Android on a 64-bit ARM kernel, `os.uname().machine` is `armv8l`. Such devices run the same userspace code as `armv7l` devices, so apply the same `armeabi_v7a` Android ABI to them, which works. - Issue: #145616
1 parent 9159287 commit 1b7a792

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

Lib/sysconfig/__init__.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -696,11 +696,15 @@ def get_platform():
696696
release = get_config_var("ANDROID_API_LEVEL")
697697

698698
# Wheel tags use the ABI names from Android's own tools.
699+
# When Python is running on 32-bit ARM Android on a 64-bit ARM kernel,
700+
# 'os.uname().machine' is 'armv8l'. Such devices run the same userspace
701+
# code as 'armv7l' devices.
699702
machine = {
700703
"x86_64": "x86_64",
701704
"i686": "x86",
702705
"aarch64": "arm64_v8a",
703706
"armv7l": "armeabi_v7a",
707+
"armv8l": "armeabi_v7a",
704708
}[machine]
705709
elif osname == "linux":
706710
# At least on Linux/Intel, 'machine' is the processor --

0 commit comments

Comments
 (0)