@@ -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 :
@@ -460,6 +460,14 @@ License
460
460
=======
461
461
462
462
.. versionadded :: 1.0
463
+ .. deprecated :: 2.4
464
+ in favour of ``License-Expression ``.
465
+
466
+ .. warning ::
467
+ As of Metadata 2.4, ``License `` and ``License-Expression `` are mutually
468
+ exclusive. If both are specified, tools which parse metadata will disregard
469
+ ``License `` and PyPI will reject uploads.
470
+ See `PEP 639 <https://peps.python.org/pep-0639/#deprecate-license-field >`__.
463
471
464
472
Text indicating the license covering the distribution where the license
465
473
is not a selection from the "License" Trove classifiers. See
@@ -477,6 +485,50 @@ Examples::
477
485
License: GPL version 3, excluding DRM provisions
478
486
479
487
488
+ .. _license-expression-optional :
489
+ .. _core-metadata-license-expression :
490
+
491
+ License-Expression
492
+ ==================
493
+
494
+ .. versionadded :: 2.4
495
+
496
+ Text string that is a valid SPDX
497
+ `license expression <https://peps.python.org/pep-0639/#term-license-expression >`__
498
+ as `defined in PEP 639 <https://peps.python.org/pep-0639/#spdx >`__.
499
+
500
+ Examples::
501
+
502
+ License-Expression: MIT
503
+ License-Expression: BSD-3-Clause
504
+ License-Expression: MIT AND (Apache-2.0 OR BSD-2-Clause)
505
+ License-Expression: MIT OR GPL-2.0-or-later OR (FSFUL AND BSD-2-Clause)
506
+ License-Expression: GPL-3.0-only WITH Classpath-Exception-2.0 OR BSD-3-Clause
507
+ License-Expression: LicenseRef-Special-License OR CC0-1.0 OR Unlicense
508
+ License-Expression: LicenseRef-Proprietary
509
+
510
+
511
+ .. _license-file-optional :
512
+ .. _core-metadata-license-file :
513
+
514
+ License-File (multiple use)
515
+ ===========================
516
+
517
+ .. versionadded :: 2.4
518
+
519
+ Each entry is a string representation of the path of a license-related file.
520
+ The path is located within the project source tree, relative to the project
521
+ root directory. For details see :pep: `639 `.
522
+
523
+ Examples::
524
+
525
+ License-File: LICENSE
526
+ License-File: AUTHORS
527
+ License-File: LICENSE.txt
528
+ License-File: licenses/LICENSE.MIT
529
+ License-File: licenses/LICENSE.CC0
530
+
531
+
480
532
.. _metadata-classifier :
481
533
.. _core-metadata-classifier :
482
534
@@ -490,6 +542,11 @@ for the distribution. Classifiers are described in :pep:`301`,
490
542
and the Python Package Index publishes a dynamic list of
491
543
`currently defined classifiers <https://pypi.org/classifiers/ >`__.
492
544
545
+ .. note ::
546
+ The use of ``License :: `` classifiers is deprecated as of Metadata 2.4,
547
+ use ``License-Expression `` instead. See
548
+ `PEP 639 <https://peps.python.org/pep-0639/#deprecate-license-classifiers >`_.
549
+
493
550
This field may be followed by an environment marker after a semicolon.
494
551
495
552
Examples::
@@ -864,6 +921,11 @@ History
864
921
865
922
- Restricted extra names to be normalized.
866
923
924
+ - August 2024: Core metadata 2.4 was approved through :pep: `639 `.
925
+
926
+ - Added the ``License-Expression `` field.
927
+ - Added the ``License-File `` field.
928
+
867
929
----
868
930
869
931
.. [1 ] reStructuredText markup:
0 commit comments