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.startswith('arm'): 19 host_arch = 'arm' 20 elif host_arch.startswith('mips'): 21 host_arch = 'mips' 22 print(host_arch) 23 24if __name__ == '__main__': 25 main() 26