Skip to content

Commit

Permalink
Bump metadata version to 2.4 to fix license bug
Browse files Browse the repository at this point in the history
When a project sets `license = { file = "LICENSE" }`, we're currently emitting a `License-File` entry, but Metadata-Version 2.3, which is invalid and now gets rejected by PyPI. This change bumps the metadata version.

Alternatively, we could only bump the version if license files are used and use the old `License` field for `license = { file = "LICENSE" }` again, but i'm not aware of any index currently rejecting metadata version 2.4.
  • Loading branch information
konstin committed Nov 28, 2024
1 parent 57c74b6 commit 1782e59
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
[package]
authors = ["konstin <konstin@mailbox.org>", "messense <messense@icloud.com>"]
name = "maturin"
version = "1.7.6-beta.1"
version = "1.7.6"
description = "Build and publish crates with pyo3, cffi and uniffi bindings as well as rust binaries as python packages"
exclude = [
"test-crates/**/*",
Expand Down
2 changes: 1 addition & 1 deletion src/metadata.rs
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@ impl Metadata23 {
/// Initializes with name, version and otherwise the defaults
pub fn new(name: String, version: Version) -> Self {
Self {
metadata_version: "2.3".to_string(),
metadata_version: "2.4".to_string(),
name,
version,
platform: vec![],
Expand Down

0 comments on commit 1782e59

Please sign in to comment.