Skip to content

Commit

Permalink
Make invalid version info in pyproject.toml less fatal (#2417)
Browse files Browse the repository at this point in the history
This PR is a simple fix #2416 by
making invalid version information in `pyproject.toml` less fatal.

Thank you for your great work on Maturin! 🍰
  • Loading branch information
mhils authored Dec 30, 2024
1 parent 1082bc4 commit 0e143c1
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/metadata.rs
Original file line number Diff line number Diff line change
Expand Up @@ -146,11 +146,11 @@ impl Metadata24 {
self.name.clone_from(&project.name);
if let Some(version) = &project.version {
if dynamic.contains("version") {
bail!("`project.dynamic` must not specify `version` when `project.version` is present in pyproject.toml");
eprintln!("⚠️ Warning: `project.dynamic` must not specify `version` when `project.version` is present in pyproject.toml");
}
self.version = version.clone();
} else if !dynamic.contains("version") {
bail!("`project.version` field is required in pyproject.toml unless it is present in the `project.dynamic` list");
eprintln!("⚠️ Warning: `project.version` field is required in pyproject.toml unless it is present in the `project.dynamic` list");
}

if let Some(description) = &project.description {
Expand Down

0 comments on commit 0e143c1

Please sign in to comment.