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
+6-1Lines changed: 6 additions & 1 deletion
Original file line number
Diff line number
Diff line change
@@ -46,9 +46,12 @@ 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>,
52
55
/// Each entry is a string giving a single classification value for the distribution.
53
56
#[cfg_attr(feature = "serde", serde(default))]
54
57
pubclassifiers:Vec<String>,
@@ -152,6 +155,7 @@ impl Metadata {
152
155
let author = get_first_value("Author");
153
156
let author_email = get_first_value("Author-email");
154
157
let license = get_first_value("License");
158
+
let license_expression = get_first_value("License-Expression");
155
159
let classifiers = get_all_values("Classifier");
156
160
let requires_dist = get_all_values("Requires-Dist");
157
161
let provides_dist = get_all_values("Provides-Dist");
0 commit comments