diff --git a/Changelog.md b/Changelog.md index 69559a41c..b302dc700 100644 --- a/Changelog.md +++ b/Changelog.md @@ -11,6 +11,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 * Consider current machine architecture when generating platform tags for abi3 wheels on linux in [#709](https://github.com/PyO3/maturin/pull/709) * Revert back to Rust 2018 edition in [#710](https://github.com/PyO3/maturin/pull/710) +* Warn missing `cffi` package dependency in [#711](https://github.com/PyO3/maturin/pull/711) ## [0.12.2] - 2021-11-26 diff --git a/src/build_context.rs b/src/build_context.rs index 46a367cc2..28ba445dd 100644 --- a/src/build_context.rs +++ b/src/build_context.rs @@ -464,6 +464,19 @@ impl BuildContext { let policy = self.auditwheel(None, &artifact, self.platform_tag)?; let (wheel_path, tag) = self.write_cffi_wheel(&artifact, policy.platform_tag())?; + // Warn if cffi isn't specified in the requirements + if !self + .metadata21 + .requires_dist + .iter() + .any(|dep| dep.to_ascii_lowercase().starts_with("cffi")) + { + eprintln!( + "⚠️ Warning: missing cffi package dependency, please add it to pyproject.toml. \ + e.g: `dependencies = [\"cffi\"]`. This will become an error." + ); + } + println!("📦 Built wheel to {}", wheel_path.display()); wheels.push((wheel_path, tag));