Skip to content

Commit

Permalink
Add Python metadata support for license-file field of Cargo.toml
Browse files Browse the repository at this point in the history
  • Loading branch information
messense committed Oct 13, 2022
1 parent 33338f5 commit 542a008
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion src/metadata.rs
Original file line number Diff line number Diff line change
Expand Up @@ -348,6 +348,11 @@ impl Metadata21 {
if let Some(repository) = package.repository.as_ref() {
project_url.insert("Source Code".to_string(), repository.clone());
}
let license_files = if let Some(license_file) = package.license_file.as_ref() {
vec![manifest_path.as_ref().join(license_file)]
} else {
Vec::new()
};

let metadata = Metadata21 {
metadata_version: "2.1".to_owned(),
Expand All @@ -373,7 +378,7 @@ impl Metadata21 {
},
author_email,
license: package.license.clone(),
license_files: Vec::new(),
license_files,

// Values provided through `[project.metadata.maturin]`
classifiers,
Expand Down

0 comments on commit 542a008

Please sign in to comment.