Skip to content

Commit 81df7e7

Browse files
committed
Add new License-Expression field. Bump to version 2.2
License expressions provide a better way to express the license of a distribution using a well defined syntax and well known license ids from SPDX. Document that License and Classifiers will no longer deal with license metadata in the future. Bump metadata specification version to 2.2 Signed-off-by: Philippe Ombredanne <[email protected]>
1 parent ecf061c commit 81df7e7

File tree

1 file changed

+35
-3
lines changed

1 file changed

+35
-3
lines changed

source/specifications/core-metadata.rst

Lines changed: 35 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,8 @@
44
Core metadata specifications
55
============================
66

7+
This is the specification for core metadata, version 2.2.
8+
79
The current core metadata file format, version 2.1, is specified in :pep:`566`.
810
It defines the following specification as the canonical source for the core
911
metadata file format.
@@ -22,7 +24,7 @@ All the other fields are optional.
2224
publishing tools (namely to remove the requirement that version specifiers
2325
must be surrounded by parentheses). Metadata consumers may want to use the
2426
more relaxed formatting rules even for metadata files that are nominally
25-
less than version 2.1.
27+
less than version 2.2.
2628

2729
.. contents:: Contents
2830
:local:
@@ -31,8 +33,9 @@ Metadata-Version
3133
================
3234

3335
.. versionadded:: 1.0
36+
.. versionchanged:: 2.2
3437

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".
3639

3740
Automated tools consuming metadata SHOULD warn if ``metadata_version`` is
3841
greater than the highest version they support, and MUST fail if
@@ -46,7 +49,7 @@ all of the needed fields.
4649

4750
Example::
4851

49-
Metadata-Version: 2.1
52+
Metadata-Version: 2.2
5053

5154

5255
Name
@@ -382,6 +385,8 @@ License
382385
=======
383386

384387
.. versionadded:: 1.0
388+
.. versionchanged:: 2.2
389+
This field will be deprecated in the future in favor of the License-Expression field.
385390

386391
Text indicating the license covering the distribution where the license
387392
is not a selection from the "License" Trove classifiers. See
@@ -399,12 +404,39 @@ Examples::
399404
License: GPL version 3, excluding DRM provisions
400405

401406

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+
402431
.. _metadata-classifier:
403432

404433
Classifier (multiple use)
405434
=========================
406435

407436
.. 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.
408440

409441
Each entry is a string giving a single classification value
410442
for the distribution. Classifiers are described in :pep:`301`,

0 commit comments

Comments
 (0)