4
4
Core metadata specifications
5
5
============================
6
6
7
+ This is the specification for core metadata, version 2.2.
8
+
7
9
The current core metadata file format, version 2.1, is specified in :pep: `566 `.
8
10
It defines the following specification as the canonical source for the core
9
11
metadata file format.
@@ -22,7 +24,7 @@ All the other fields are optional.
22
24
publishing tools (namely to remove the requirement that version specifiers
23
25
must be surrounded by parentheses). Metadata consumers may want to use the
24
26
more relaxed formatting rules even for metadata files that are nominally
25
- less than version 2.1 .
27
+ less than version 2.2 .
26
28
27
29
.. contents :: Contents
28
30
:local:
@@ -31,8 +33,9 @@ Metadata-Version
31
33
================
32
34
33
35
.. versionadded :: 1.0
36
+ .. versionchanged :: 2.2
34
37
35
- Version of the file format; legal values are "1.0", "1.1", "1.2" and "2.1 ".
38
+ Version of the file format; legal values are "1.0", "1.1", "1.2", "2.1" and "2.2 ".
36
39
37
40
Automated tools consuming metadata SHOULD warn if ``metadata_version `` is
38
41
greater than the highest version they support, and MUST fail if
@@ -46,7 +49,7 @@ all of the needed fields.
46
49
47
50
Example::
48
51
49
- Metadata-Version: 2.1
52
+ Metadata-Version: 2.2
50
53
51
54
52
55
Name
@@ -382,6 +385,8 @@ License
382
385
=======
383
386
384
387
.. versionadded :: 1.0
388
+ .. versionchanged :: 2.2
389
+ This field will be deprecated in the future in favor of the License-Expression field.
385
390
386
391
Text indicating the license covering the distribution where the license
387
392
is not a selection from the "License" Trove classifiers. See
@@ -399,12 +404,39 @@ Examples::
399
404
License: GPL version 3, excluding DRM provisions
400
405
401
406
407
+ .. _license-expression-optional :
408
+
409
+ License-Expression
410
+ ==================
411
+
412
+ .. versionadded :: 2.2
413
+
414
+ A string with the license expression using `SPDX license expression syntax and
415
+ identifiers <https://spdx.org/ids> `__ that indicates the license(s) covering the
416
+ distribution. The license expressions are specified in the `SPDX specification
417
+ <https://spdx.org/spdx-specification-21-web-version#h.jxpfx0ykyb60> `_.
418
+ SPDX also publishes a companion `list of license ids <https://spdx.org/license-list >`_
419
+ for use in license expressions. This field is not case sensitive though the
420
+ normalized representation of a license expression is case-sensitive.
421
+
422
+ Examples::
423
+
424
+ License-Expression: BSD-3-Clause
425
+
426
+ License-Expression: MIT OR GPL-2.0-or-later AND (FSFUL AND BSD-2-Clause)
427
+
428
+ License-Expression: GPL-3.0-or-later WITH Classpath-Exception-2.0 OR BSD-3-Clause
429
+
430
+
402
431
.. _metadata-classifier :
403
432
404
433
Classifier (multiple use)
405
434
=========================
406
435
407
436
.. versionadded :: 1.1
437
+ .. versionchanged :: 2.2
438
+ The license-related classifiers will be removed and deprecated in the future
439
+ in favor of using the License-Expression field.
408
440
409
441
Each entry is a string giving a single classification value
410
442
for the distribution. Classifiers are described in :pep: `301 `,
0 commit comments