diff --git a/src/build_options.rs b/src/build_options.rs index 898295f3b..f99966186 100644 --- a/src/build_options.rs +++ b/src/build_options.rs @@ -470,7 +470,7 @@ fn is_generating_abi3_import_lib(cargo_metadata: &Metadata) -> Result { .resolve .as_ref() .context("Expected cargo to return metadata with resolve")?; - for &lib in PYO3_BINDING_CRATES.iter() { + for &lib in PYO3_BINDING_CRATES.iter().rev() { let pyo3_packages = resolve .nodes .iter()