You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: src/metadata.rs
+11-1Lines changed: 11 additions & 1 deletion
Original file line number
Diff line number
Diff line change
@@ -46,9 +46,15 @@ pub struct Metadata {
46
46
/// A string containing the author’s e-mail address. It can contain a name and e-mail address in the legal forms for a RFC-822 `From:` header.
47
47
#[cfg_attr(feature = "serde", serde(default))]
48
48
pubauthor_email:Option<String>,
49
-
/// Text indicating the license covering the distribution where the license is not a selection from the `License` Trove classifiers.
49
+
/// Text indicating the license covering the distribution where the license is not a selection from the `License` Trove classifiers or an SPDX license expression.
50
50
#[cfg_attr(feature = "serde", serde(default))]
51
51
publicense:Option<String>,
52
+
/// An SPDX expression indicating the license covering the distribution.
53
+
#[cfg_attr(feature = "serde", serde(default))]
54
+
publicense_expression:Option<String>,
55
+
/// Paths to files containing the text of the licenses covering the distribution.
56
+
#[cfg_attr(feature = "serde", serde(default))]
57
+
publicense_files:Vec<String>,
52
58
/// Each entry is a string giving a single classification value for the distribution.
53
59
#[cfg_attr(feature = "serde", serde(default))]
54
60
pubclassifiers:Vec<String>,
@@ -152,6 +158,8 @@ impl Metadata {
152
158
let author = get_first_value("Author");
153
159
let author_email = get_first_value("Author-email");
154
160
let license = get_first_value("License");
161
+
let license_expression = get_first_value("License-Expression");
162
+
let license_files = get_all_values("License-File");
155
163
let classifiers = get_all_values("Classifier");
156
164
let requires_dist = get_all_values("Requires-Dist");
157
165
let provides_dist = get_all_values("Provides-Dist");
0 commit comments