@@ -18,9 +18,11 @@ pub struct Metadata {
18
18
pub version : String ,
19
19
/// A Platform specification describing an operating system supported by the distribution
20
20
/// which is not listed in the “Operating System” Trove classifiers.
21
+ #[ cfg_attr( feature = "serde" , serde( default ) ) ]
21
22
pub platforms : Vec < String > ,
22
23
/// Binary distributions containing a PKG-INFO file will use the Supported-Platform field
23
24
/// in their metadata to specify the OS and CPU for which the binary distribution was compiled.
25
+ #[ cfg_attr( feature = "serde" , serde( default ) ) ]
24
26
pub supported_platforms : Vec < String > ,
25
27
/// A one-line summary of what the distribution does.
26
28
pub summary : Option < String > ,
@@ -40,13 +42,17 @@ pub struct Metadata {
40
42
/// Text indicating the license covering the distribution where the license is not a selection from the `License` Trove classifiers.
41
43
pub license : Option < String > ,
42
44
/// Each entry is a string giving a single classification value for the distribution.
45
+ #[ cfg_attr( feature = "serde" , serde( default ) ) ]
43
46
pub classifiers : Vec < String > ,
44
47
/// Each entry contains a string naming some other distutils project required by this distribution.
48
+ #[ cfg_attr( feature = "serde" , serde( default ) ) ]
45
49
pub requires_dist : Vec < String > ,
46
50
/// Each entry contains a string naming a Distutils project which is contained within this distribution.
51
+ #[ cfg_attr( feature = "serde" , serde( default ) ) ]
47
52
pub provides_dist : Vec < String > ,
48
53
/// Each entry contains a string describing a distutils project’s distribution which this distribution renders obsolete,
49
54
/// meaning that the two projects should not be installed at the same time.
55
+ #[ cfg_attr( feature = "serde" , serde( default ) ) ]
50
56
pub obsoletes_dist : Vec < String > ,
51
57
/// A string containing the maintainer’s name at a minimum; additional contact information may be provided.
52
58
///
@@ -62,16 +68,20 @@ pub struct Metadata {
62
68
/// This field specifies the Python version(s) that the distribution is guaranteed to be compatible with.
63
69
pub requires_python : Option < String > ,
64
70
/// Each entry contains a string describing some dependency in the system that the distribution is to be used.
71
+ #[ cfg_attr( feature = "serde" , serde( default ) ) ]
65
72
pub requires_external : Vec < String > ,
66
73
/// A string containing a browsable URL for the project and a label for it, separated by a comma.
74
+ #[ cfg_attr( feature = "serde" , serde( default ) ) ]
67
75
pub project_urls : Vec < String > ,
68
76
/// A string containing the name of an optional feature. Must be a valid Python identifier.
69
77
/// May be used to make a dependency conditional on whether the optional feature has been requested.
78
+ #[ cfg_attr( feature = "serde" , serde( default ) ) ]
70
79
pub provides_extras : Vec < String > ,
71
80
/// A string stating the markup syntax (if any) used in the distribution’s description,
72
81
/// so that tools can intelligently render the description.
73
82
pub description_content_type : Option < String > ,
74
83
/// A string containing the name of another core metadata field.
84
+ #[ cfg_attr( feature = "serde" , serde( default ) ) ]
75
85
pub dynamic : Vec < String > ,
76
86
}
77
87
0 commit comments