Skip to content

Commit

Permalink
Support abi3-py310
Browse files Browse the repository at this point in the history
  • Loading branch information
danjujan committed Dec 19, 2021
1 parent 10ee1ff commit bfaabf7
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/build_options.rs
Original file line number Diff line number Diff line change
Expand Up @@ -356,11 +356,11 @@ fn has_abi3(cargo_metadata: &Metadata) -> Result<Option<(u8, u8)>> {
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::<u8>()?,
(x.as_bytes()[8] as char).to_string().parse::<u8>()?,
x[8..].parse::<u8>()?,
))
})
.collect::<Result<Vec<(u8, u8)>>>()
Expand Down

0 comments on commit bfaabf7

Please sign in to comment.