forked from python/peps
-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add PEP draft for SPDX license expressions
Signed-off-by: Philippe Ombredanne <pombredanne@nexb.com>
- Loading branch information
1 parent
fd40249
commit 7e46cc8
Showing
1 changed file
with
155 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,155 @@ | ||
PEP: 9999 | ||
Title: Metadata for Python Software Packages 2.2 | ||
Version: $Revision$ | ||
Last-Modified: $Date$ | ||
Author: Philippe Ombredanne <pombredanne@nexb.com> | ||
BDFL-Delegate: | ||
Discussions-To: distutils-sig <distutils-sig at python.org> | ||
Status: | ||
Type: Standards Track | ||
Content-Type: text/x-rst | ||
Created: 15-Aug-2018 | ||
Python-Version: 3.x | ||
Post-History: | ||
Replaces: 566 | ||
Resolution: | ||
|
||
Abstract | ||
======== | ||
|
||
This PEP describes the changes between versions 2.1 and 2.2 of the core | ||
metadata specification for Python packages. Version 2.1 is specified in PEP | ||
566. | ||
|
||
The key and only change introduced in this PEP is how license is documented in | ||
package medata. | ||
|
||
Software is licensed and providing accurate licensing information to Python | ||
packages users is an important matter. Yet, license metadata are limited often | ||
leading to some confusion. | ||
|
||
- There are two overlapping places where a license can be documented leading to | ||
confusion for packagers: license-related `Classifiers` and the `License` | ||
attribute. | ||
|
||
- Furthermore, it is difficult to convey anything but simple licensing using | ||
these two fields. License information expressiveness and clarity when creating | ||
packages will help packagers and users alike. | ||
|
||
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. | ||
|
||
This PEP was started based on several discussions and in particular: | ||
|
||
- `<https://github.com/pypa/warehouse/issues/2996>`_ | ||
- `<https://github.com/pypa/interoperability-peps/issues/46>`_ | ||
- `<https://github.com/pypa/wheel/issues/138>`_ | ||
- `<https://github.com/pombredanne/spdx-pypi-pep/issues/1#issuecomment-281343077>`_ | ||
|
||
Fields | ||
====== | ||
|
||
The canonical source for the names and semantics of each of the supported | ||
metadata fields is the `Core Metadata Specification`_ document. | ||
|
||
The details for the update to the `Core Metadata Specification`_ document are | ||
in this `Core Metadata Specification pull request`_. | ||
|
||
|
||
New in Version 2.2 | ||
------------------ | ||
|
||
License-Expression (optional) | ||
::::::::::::::::::::::::::::: | ||
|
||
A string containing a license expression using the SPDX license expression | ||
syntax and SPDX-listed license identifiers so that user can express accurately | ||
the licensing of a package in a way that is both easy to read for humans and | ||
easy to process automatically by tools. | ||
|
||
A string containing a license expression using `SPDX license expression syntax and | ||
identifiers <https://spdx.org/ids>`__ that indicates the license(s) covering the | ||
distribution. The license expressions are specified in the `SPDX specification | ||
<https://spdx.org/spdx-specification-21-web-version#h.jxpfx0ykyb60>`_. | ||
SPDX also publishes a companion `list of license ids <https://spdx.org/license-list>`_ | ||
for use in license expressions. | ||
|
||
Note: this field is not case sensitive though the normalized representation of | ||
an SPDX license expression has a well defined case. | ||
|
||
Examples:: | ||
|
||
License-Expression: BSD-3-Clause | ||
|
||
License-Expression: MIT OR GPL-2.0-or-later AND (FSFUL AND BSD-2-Clause) | ||
|
||
License-Expression: GPL-3.0-or-later WITH Classpath-Exception-2.0 OR BSD-3-Clause | ||
|
||
|
||
Tools `should` validate that this field contains a valid license expression | ||
and `should` report a warning if the field contains an invalid expression. | ||
|
||
|
||
Changed in Version 2.2 | ||
---------------------- | ||
|
||
License | ||
::::::: | ||
|
||
This field will be deprecated in the future and its documentation has been | ||
updated accordingly. Tools are encouraged to provide a warning when this field | ||
is used. | ||
|
||
Classifiers | ||
::::::::::: | ||
|
||
The use of license-related classifiers in this field will be deprecated in the | ||
future and its documentation has been updated accordingly. Tools are encouraged | ||
to provide a warning when this field is used with license-related classifiers. | ||
|
||
|
||
Summary of Differences From PEP 566 | ||
=================================== | ||
|
||
* Metadata-Version is now 2.2. | ||
|
||
* Added one new field: ``License-Expression`` | ||
|
||
* Updated the documentation of two fields: ``License`` and ``Classifiers`` | ||
|
||
|
||
References | ||
========== | ||
|
||
This document specifies version 2.2 of the metadata format. | ||
Version 1.0 is specified in PEP 241. | ||
Version 1.1 is specified in PEP 314. | ||
Version 1.2 is specified in PEP 345. | ||
Version 2.0, while not formally accepted, was specified in PEP 426. | ||
Version 2.1 is specified in PEP 566. | ||
|
||
.. _`Core Metadata Specification`: | ||
https://packaging.python.org/specifications/core-metadata/ | ||
|
||
.. _`Core Metadata Specification pull request`: | ||
https://github.com/pypa/packaging.python.org/pull/635/ | ||
|
||
|
||
Copyright | ||
========= | ||
|
||
This document has been placed in the public domain. | ||
|
||
|
||
Acknowledgements | ||
================ | ||
|
||
|
||
|
||
.. | ||
Local Variables: | ||
mode: indented-text | ||
indent-tabs-mode: nil | ||
sentence-end-double-space: t | ||
fill-column: 80 | ||
End: |