Skip to content

Commit f7891eb

Browse files
committed
add documentation for PEP 639, License-Expression and License-Field
1 parent afb69f3 commit f7891eb

File tree

1 file changed

+51
-2
lines changed

1 file changed

+51
-2
lines changed

source/specifications/core-metadata.rst

Lines changed: 51 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@ Metadata-Version
4848
.. versionadded:: 1.0
4949

5050
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".
5252

5353
Automated tools consuming metadata SHOULD warn if ``metadata_version`` is
5454
greater than the highest version they support, and MUST fail if
@@ -63,7 +63,7 @@ all of the needed fields.
6363

6464
Example::
6565

66-
Metadata-Version: 2.3
66+
Metadata-Version: 2.4
6767

6868

6969
.. _core-metadata-name:
@@ -477,6 +477,50 @@ Examples::
477477
License: GPL version 3, excluding DRM provisions
478478

479479

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+
480524
.. _metadata-classifier:
481525
.. _core-metadata-classifier:
482526

@@ -864,6 +908,11 @@ History
864908

865909
- Restricted extra names to be normalized.
866910

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+
867916
----
868917

869918
.. [1] reStructuredText markup:

0 commit comments

Comments
 (0)