@@ -48,7 +48,7 @@ Metadata-Version
48
48
.. versionadded :: 1.0
49
49
50
50
Version of the file format; legal values are "1.0", "1.1", "1.2", "2.1",
51
- "2.2", and "2.3 ".
51
+ "2.2", "2.3", and "2.4 ".
52
52
53
53
Automated tools consuming metadata SHOULD warn if ``metadata_version `` is
54
54
greater than the highest version they support, and MUST fail if
@@ -63,7 +63,7 @@ all of the needed fields.
63
63
64
64
Example::
65
65
66
- Metadata-Version: 2.3
66
+ Metadata-Version: 2.4
67
67
68
68
69
69
.. _core-metadata-name :
@@ -477,6 +477,50 @@ Examples::
477
477
License: GPL version 3, excluding DRM provisions
478
478
479
479
480
+ .. _license-expression-optional :
481
+ .. _core-metadata-license-expression :
482
+
483
+ License-Expression
484
+ ==================
485
+
486
+ .. versionadded :: 2.4
487
+
488
+ Text string that is a valid SPDX
489
+ `license expression <https://peps.python.org/pep-0639/#term-license-expression >`__
490
+ as `defined in PEP 639 <https://peps.python.org/pep-0639/#spdx >`__.
491
+
492
+ Examples::
493
+
494
+ License-Expression: MIT
495
+ License-Expression: BSD-3-Clause
496
+ License-Expression: MIT AND (Apache-2.0 OR BSD-2-Clause)
497
+ License-Expression: MIT OR GPL-2.0-or-later OR (FSFUL AND BSD-2-Clause)
498
+ License-Expression: GPL-3.0-only WITH Classpath-Exception-2.0 OR BSD-3-Clause
499
+ License-Expression: LicenseRef-Special-License OR CC0-1.0 OR Unlicense
500
+ License-Expression: LicenseRef-Proprietary
501
+
502
+
503
+ .. _license-file-optional :
504
+ .. _core-metadata-license-file :
505
+
506
+ License-File (multiple use)
507
+ ===========================
508
+
509
+ .. versionadded :: 2.4
510
+
511
+ Each entry is a string representation of the path of a license-related file.
512
+ The path is located within the project source tree, relative to the project
513
+ root directory.
514
+
515
+ Examples::
516
+
517
+ License-File: LICENSE
518
+ License-File: AUTHORS
519
+ License-File: LICENSE.txt
520
+ License-File: licenses/LICENSE.MIT
521
+ License-File: licenses/LICENSE.CC0
522
+
523
+
480
524
.. _metadata-classifier :
481
525
.. _core-metadata-classifier :
482
526
@@ -864,6 +908,11 @@ History
864
908
865
909
- Restricted extra names to be normalized.
866
910
911
+ - August 2024: Core metadata 2.4 was approved through :pep: `639 `.
912
+
913
+ - Added the ``License-Expression `` field.
914
+ - Added the ``License-File `` field.
915
+
867
916
----
868
917
869
918
.. [1 ] reStructuredText markup:
0 commit comments