diff --git a/src/build_options.rs b/src/build_options.rs index e55265f32..6f0d2347c 100644 --- a/src/build_options.rs +++ b/src/build_options.rs @@ -356,11 +356,11 @@ fn has_abi3(cargo_metadata: &Metadata) -> Result> { let min_abi3_version = pyo3_crate .features .iter() - .filter(|x| x.starts_with("abi3-py") && x.len() == "abi3-pyxx".len()) + .filter(|x| x.starts_with("abi3-py") && x.len() >= "abi3-pyxx".len()) .map(|x| { Ok(( (x.as_bytes()[7] as char).to_string().parse::()?, - (x.as_bytes()[8] as char).to_string().parse::()?, + x[8..].parse::()?, )) }) .collect::>>()