]> glassweightruler.freedombox.rocks Git - waydroid.git/blob - tools/helpers/arch.py
props: Use subprocess for host getprop
[waydroid.git] / tools / helpers / arch.py
1 # Copyright 2021 Oliver Smith
2 # SPDX-License-Identifier: GPL-3.0-or-later
3 import platform
4
5 def host():
6 machine = platform.machine()
7
8 mapping = {
9 "i686": "x86",
10 "x86_64": "x86_64",
11 "aarch64": "arm64",
12 "armv7l": "arm",
13 "armv8l": "arm"
14 }
15 if machine in mapping:
16 return mapping[machine]
17 raise ValueError("platform.machine '" + machine + "'"
18 " architecture is not supported")