1#!/usr/bin/env python 2# 3# This Source Code Form is subject to the terms of the Mozilla Public 4# License, v. 2.0. If a copy of the MPL was not distributed with this file, 5# You can obtain one at http://mozilla.org/MPL/2.0/. 6 7from __future__ import print_function 8 9import fnmatch 10import platform 11 12def main(): 13 host_arch = platform.machine().lower() 14 if host_arch in ('amd64', 'x86_64'): 15 host_arch = 'x64' 16 elif fnmatch.fnmatch(host_arch, 'i?86') or host_arch == 'i86pc': 17 host_arch = 'ia32' 18 elif host_arch == 'arm64': 19 pass 20 elif host_arch.startswith('arm'): 21 host_arch = 'arm' 22 elif host_arch.startswith('mips64'): 23 host_arch = 'mips64' 24 elif host_arch.startswith('mips'): 25 host_arch = 'mips' 26 print(host_arch) 27 28if __name__ == '__main__': 29 main() 30