()
| 1958 | |
| 1959 | |
| 1960 | def get_architecture() -> Arch: |
| 1961 | try: |
| 1962 | machine = platform.machine().lower() |
| 1963 | except Exception: |
| 1964 | return "unknown" |
| 1965 | |
| 1966 | if machine in ("arm64", "aarch64"): |
| 1967 | return "arm64" |
| 1968 | |
| 1969 | # TODO: untested |
| 1970 | if machine == "arm": |
| 1971 | return "arm" |
| 1972 | |
| 1973 | if machine == "x86_64": |
| 1974 | return "x64" |
| 1975 | |
| 1976 | # TODO: untested |
| 1977 | if sys.maxsize <= 2**32: |
| 1978 | return "x32" |
| 1979 | |
| 1980 | if machine: |
| 1981 | return OtherArch(machine) |
| 1982 | |
| 1983 | return "unknown" |
| 1984 | |
| 1985 | |
| 1986 | def _merge_mappings( |
no test coverage detected