From b9655d1d4c9cd72f5cbca4ed7cd9c0ccd12530f3 Mon Sep 17 00:00:00 2001 From: messense Date: Sat, 16 Apr 2022 19:30:01 +0800 Subject: [PATCH] Look for pyo3 crate first for `generate-abi3-import-lib` feature pyo3-ffi doesn't have `generate-abi3-import-lib` feature yet. --- src/build_options.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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()