Open barracuda156 opened 2 weeks ago
Not sure how to force it recognize the arch correctly upon parsing, but this hack works:
--- cpuinfo/cpuinfo.py 2022-10-26 03:07:15.000000000 +0800
+++ cpuinfo/cpuinfo.py 2024-11-08 17:01:28.000000000 +0800
@@ -361,7 +361,7 @@
def _check_arch():
arch, bits = _parse_arch(DataSource.arch_string_raw)
if not arch in ['X86_32', 'X86_64', 'ARM_7', 'ARM_8',
- 'PPC_64', 'S390X', 'MIPS_32', 'MIPS_64',
+ 'PPC_32', 'PPC_64', 'S390X', 'MIPS_32', 'MIPS_64',
"RISCV_32", "RISCV_64"]:
raise Exception("py-cpuinfo currently only works on X86 "
"and some ARM/PPC/S390X/MIPS/RISCV CPUs.")
@@ -829,6 +829,9 @@
elif re.match(r'^riscv64$|^riscv64be$', arch_string_raw):
arch = 'RISCV_64'
bits = 64
+ else:
+ arch = 'PPC_32'
+ bits = 32
return (arch, bits)
In your bug report please include:
cpuinfo
omitsPPC
/PPC_32
in the list which breaks dependents:In fact the arch is present just below in
cpuinfo.py
:But it is broken by an earlier chunk: