From bfaabf74e750b22fdbc652b45e7c9039f9fb894b Mon Sep 17 00:00:00 2001 From: danjujan <> Date: Sun, 19 Dec 2021 17:02:24 +0100 Subject: [PATCH] Support abi3-py310 --- src/build_options.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) 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::>>()