Skip to content

Commit

Permalink
Warn missing cffi package dependency
Browse files Browse the repository at this point in the history
  • Loading branch information
messense committed Nov 28, 2021
1 parent e6529d0 commit 4e97e2c
Showing 1 changed file with 14 additions and 0 deletions.
14 changes: 14 additions & 0 deletions src/build_context.rs
Original file line number Diff line number Diff line change
Expand Up @@ -464,6 +464,20 @@ 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()
.find(|dep| dep.to_ascii_lowercase().starts_with("cffi"))
.is_none()
{
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));

Expand Down

0 comments on commit 4e97e2c

Please sign in to comment.