44Core metadata specifications
55============================
66
7- The current core metadata file format, version 2.1, is specified in :pep: `566 `.
8- It defines the following specification as the canonical source for the core
9- metadata file format.
10-
117Fields defined in the following specification should be considered valid,
128complete and not subject to change. The required fields are:
139
@@ -32,7 +28,8 @@ Metadata-Version
3228
3329.. versionadded :: 1.0
3430
35- Version of the file format; legal values are "1.0", "1.1", "1.2" and "2.1".
31+ Version of the file format; legal values are "1.0", "1.1", "1.2", "2.1"
32+ and "2.2".
3633
3734Automated tools consuming metadata SHOULD warn if ``metadata_version `` is
3835greater than the highest version they support, and MUST fail if
@@ -46,7 +43,7 @@ all of the needed fields.
4643
4744Example::
4845
49- Metadata-Version: 2.1
46+ Metadata-Version: 2.2
5047
5148
5249.. _core-metadata-name :
@@ -86,6 +83,36 @@ Example::
8683 Version: 1.0a2
8784
8885
86+ Dynamic (multiple use)
87+ ======================
88+
89+ .. versionadded :: 2.2
90+
91+ A string containing the name of another core metadata field. The field
92+ names ``Name `` and ``Version `` may not be specified in this field.
93+
94+ When found in the metadata of a source distribution, the following
95+ rules apply:
96+
97+ 1. If a field is *not * marked as ``Dynamic ``, then the value of the field
98+ in any wheel built from the sdist MUST match the value in the sdist.
99+ If the field is not in the sdist, and not marked as ``Dynamic ``, then
100+ it MUST NOT be present in the wheel.
101+ 2. If a field is marked as ``Dynamic ``, it may contain any valid value in
102+ a wheel built from the sdist (including not being present at all).
103+
104+ If the sdist metadata version is older than version 2.2, then all fields should
105+ be treated as if they were specified with ``Dynamic `` (i.e. there are no special
106+ restrictions on the metadata of wheels built from the sdist).
107+
108+ In any context other than a source distribution, ``Dynamic `` is for information
109+ only, and indicates that the field value was calculated at wheel build time,
110+ and may not be the same as the value in the sdist or in other wheels for the
111+ project.
112+
113+ Full details of the semantics of ``Dynamic `` are described in :pep: `643 `.
114+
115+
89116Platform (multiple use)
90117=======================
91118
0 commit comments