diff --git a/src/python_interpreter/config.rs b/src/python_interpreter/config.rs index 8f8838870..ef6560108 100644 --- a/src/python_interpreter/config.rs +++ b/src/python_interpreter/config.rs @@ -432,6 +432,25 @@ mod test { .unwrap(); assert_eq!(sysconfig.ext_suffix, ".cpython-310-powerpc-linux-gnu.so"); + let sysconfig = InterpreterConfig::lookup_one( + &Target::from_target_triple(Some("mips64-unknown-linux-gnu".to_string())).unwrap(), + InterpreterKind::CPython, + (3, 10), + ) + .unwrap(); + assert_eq!( + sysconfig.ext_suffix, + ".cpython-310-mips64-linux-gnuabi64.so" + ); + + let sysconfig = InterpreterConfig::lookup_one( + &Target::from_target_triple(Some("mips-unknown-linux-gnu".to_string())).unwrap(), + InterpreterKind::CPython, + (3, 10), + ) + .unwrap(); + assert_eq!(sysconfig.ext_suffix, ".cpython-310-mips-linux-gnu.so"); + let sysconfig = InterpreterConfig::lookup_one( &Target::from_target_triple(Some("s390x-unknown-linux-gnu".to_string())).unwrap(), InterpreterKind::CPython, diff --git a/src/target.rs b/src/target.rs index 93afd9bb2..25fc6c07f 100644 --- a/src/target.rs +++ b/src/target.rs @@ -396,7 +396,9 @@ impl Target { match python_impl { CPython => { // For musl handling see https://github.com/pypa/auditwheel/issues/349 - if python_version >= (3, 11) { + if matches!(self.target_arch(), Arch::Mips64 | Arch::Mips64el) && self.is_linux() { + "gnuabi64".to_string() + } else if python_version >= (3, 11) { self.target_env().to_string() } else { self.target_env().to_string().replace("musl", "gnu")