Skip to content

Latest commit

 

History

History
891 lines (650 loc) · 37.7 KB

pep-9999.rst

File metadata and controls

891 lines (650 loc) · 37.7 KB

PEP: 9999 Title: Metadata for Python Software Packages 2.2 Version: $Revision$ Last-Modified: $Date$ Author: Philippe Ombredanne <pombredanne at nexb.com> Sponsor: Paul Moore <p.f.moore at gmail.com> BDFL-Delegate: Paul Moore <p.f.moore at gmail.com> Discussions-To: https://discuss.python.org/t/improving-license-clarity-with-better-package-metadata Status: Draft 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 [1] for Python packages. Version 2.1 is specified in PEP 566.

The primary change introduced in this PEP update how license is documented in Core metadata in the License field with License Expression strings using SPDX license IDs [6] such that license documentation is simpler and less ambiguous:

  • for package authors to create,
  • for package users to read and understand, and,
  • for tools to process package license information mechanically.

The other changes include:

  • specifying a License-File field which is already used by wheel and setuptools to include license files in built distributions.
  • defining how tools can validate license expressions and report warnings to users for invalid expressions (but still accept any string as License).

Goals

This PEP's scope is limited strictly to how we document the license of a package distribution:

  • with an improved and structured way to document a license expression, and,
  • by including license texts in a built package.

The core metadata specification updates that are part of this PEP, have been designed to have minimal impact and to be backward compatible with v2.1. These changes utilize emerging new ways to document licenses that are already in use in some tools (e.g. by adding Licence-File field already used in wheel and setuptools) or by some package authors (e.g. storing an SPDX license expression in the existing License field).

In addition to an update to the metadata specification, this PEP contains:

  • recommendations for Publishing tools on how to validate the License and Classifier fields and report informational warnings when a package uses an older, non- structured style of license documentation conventions.
  • informational appendixes that contain surveys of how we document license today in Python packages and elsewhere, and a reference Python library to parse, validate and build correct license expressions.

It is the intent of the PEP authors to work closely with tool authors to implement to recommendations for validation and warnings specified in this PEP.

Non-Goals

This PEP is neutral regarding the choice of various licenses.

In particular, the SPDX license expression syntax proposed in this PEP provides simpler and more expressive conventions to document more accurately any kind of license that applies to a Python package, whether under an open source, free or libre software license or a proprietary license.

This PEP makes no recommendation for certain licenses or require the use of certain license documentation conventions. This PEP also does not impose any restrictions when uploading to PyPI.

Instead, this PEP is intended to document common practices already in use, and recommends that Publishing tools should gently nag users with informational warnings when they do not follow this PEP recommendations.

This PEP is not about documenting license in code files, even though this is a surveyed topic in Appendix.

Possible future PEPs

It is the intention of the authors of this PEP to consider the submission of related but separate PEPs in the future such as:

  • make License and new License-File fields mandatory including stricter enforcement in tools and PyPI publishing.
  • require uploads to PyPI to use only FOSS (Free and Open Source software) licenses.

Motivation

Software is licensed and providing accurate licensing information to Python packages users is an important matter. Today, there are multiple places where license is documented in package metadata and there are limitations to what can be documented. This is often leading to confusion or a lack of clarity both for package authors and package users.

Several package authors have expressed difficulty and/or frustrations with the possibilities to express licensing in package metadata. This also applies to Linux and BSD* distribution packagers. This has triggered several license-related discussions and issues and in particular:

On average, Python packages tend to have more ambiguous or missing license information than other common application package formats (such as npm, Maven or Gem) as can be seen in the statistics [2] page of the ClearlyDefined [3] project that cover all packages from PyPI, Maven, npm and Rubygems. ClearlyDefined is an open source project to help improve clarity of other open source projecs that is incubating at the OSI (Open Source Initiative) [4].

Rationale

A mini survey of existing license metadata definitions in use in Python today and documented in several other system/distro and application package formats is provided in Appendix 2, of this PEP.

There are a few takeaways from the survey:

  • Most package formats use a single License field.
  • Many modern package formats use some form of license expression syntax to optionally combine more than one license identifiers together. SPDX and SPDX-like syntaxes are the most popular in use.
  • SPDX license IDs are becoming a de-facto way to reference common licenses everywhere, whether or not a license expression syntax is used.
  • Several package formats support documenting both a license expression and the paths of the corresponding files that contain the license text. Most free and open source software licenses require to include their full text in a distribution.

These considerations have guided the design and recommendations of this PEP.

The reuse of the License field with license expressions will provide an intuitive and more structured way to express the license of a distribution using a well-defined syntax and well-known license ID.

Over time, recommending the usage of these expressions will help Python package publishers improve the clarity of their license documentation to the benefit of packages authors, consumers and redistributors.

Core Metadata Specification updates

The canonical source for the names and semantics of each of the supported metadata fields is the Core Metadata Specification [1] document.

The details of the updates considered to the Core Metadata Specification [1] document as part of this PEP are detailed here and will be added to the canonical source once this PEP is approved.

Added in Version 2.2

License-File (multiple use)

The License-File is a string that is a package-root relative path to a license file. The license file content __must__ be UTF-8-encoded text.

Build tools SHOULD honor this field and include the corresponding license file(s) in the built package.

Changed in Version 2.2

License (optional)

Text indicating the license covering the distribution. This text can be either a valid License Expression as defined here or any free text.

Publishing tools SHOULD issue an informational warning if this field is empty or missing or is not a valid License Expression as defined here. Build tools MAY issue such a warning too.

License Expression syntax

A License Expression is a string using the SPDX license expression syntax as documented in the SPDX specification [7] using either Version 2.1 [8] or a later compatible version. SPDX is a working group at the Linux Foundation that defines a standard way to exchange package information.

When used in the License field and as a specialization of the SPDX license expression definition, a License Expression can use the following license identifiers:

  • any SPDX-listed license short-form identifiers that are published in the SPDX License List [6] using either Version 3.6 of this list or any later compatible version. Note that the SPDX working group never removes any license identifiers: instead they may only mark one as "obsolete".
  • the LicenseRef-Public-Domain and LicenseRef-Proprietary strings to support generic ids that are not available in the SPDX license list.

When processing the License field to determine if it contains a valid license expression, tools:

  • MUST ignore the case of the License field
  • SHOULD report an informational warning if one or more of the following applies:
    • the field does not contain a license expression,
    • the license expression syntax is invalid,
    • the license expression syntax is valid but some license identifiers are unknown as defined here or the license identifiers have been marked as deprecated in the SPDX License List [6]
  • SHOULD store a case-normalized version of the License field using the reference case for each SPDX license identifier and uppercase for the AND, OR and WITH keywords. And SHOULD report an informational warning if the reference case is not used.

License expression examples:

License: MIT

License: BSD-3-Clause

License: MIT OR GPL-2.0-or-later OR (FSFUL AND BSD-2-Clause)

License: GPL-3.0-only WITH Classpath-Exception-2.0 OR BSD-3-Clause

License: This software may only be obtained by sending the
        author a postcard, and then the user promises not
        to redistribute it.

License: LicenseRef-Proprietary AND LicenseRef-Public-Domain

Classifier (multiple use)

Each entry is a string giving a single classification value for the distribution. Classifiers are described in PEP 301.

Examples:

Classifier: Development Status :: 4 - Beta
Classifier: Environment :: Console (Text Based)

Tools SHOULD issue an informational warning if this field contains a licensing related Classifier string starting with the License:: prefix and SHOULD suggest the use of a License Expression in the License field instead.

If the License field is present and contains a valid License Expression, publishing tools MUST NOT also provide any licensing related Classifiers entries [5].

However, for compatibility with existing publishing and installation processes, licensing-related Classifiers entries SHOULD continue to be accepted if the License field is absent or does not contain a valid License Expression.

Publishing tools MAY infer a License Expression from the provided Classifiers entries if they are able to do so unambiguously.

However, no new licensing related classifiers will be added, with anyone requesting them being directed to use a License Expression in the License field instead. Note that the licensing related Classifiers may be deprecated in a future PEP.

Mapping legacy Classifiers to new License Expressions

Publishing tools MAY infer or suggest an equivalent License Expression from the provided License or Classifiers information if they are able to do so unambiguously. For instance, if a package only has this license classifier:

Classifier: `License :: OSI Approved :: MIT License`

Then the corresponding value for License using a valid license expression to suggest would be:

License: MIT

Here are mappings guidelines for the legacy classifiers:

  • Classifier License :: Other/Proprietary License becomes License: LicenseRef-Proprietary expression.
  • Classifier License :: Public Domain becomes License: LicenseRef-Public-Domain expression, though tools should encourage the use of more explicit and legally portable licenses identifiers such as CC0-1.0 [@cc0]_, the Unlicense [68]: the meaning associated with the term "public domain" is thoroughly dependent on the specific legal jurisdiction involved and some jurisdictions have no concept of Public Domain as it exists in the USA.
  • The generic and ambiguous Classifiers License :: OSI Approved and License :: DFSG approved do not have an equivalent license expression.
  • The generic and sometimes ambiguous Classifiers License :: Free For Educational Use, License :: Free For Home Use, License :: Free for non-commercial use, License :: Freely Distributable, License :: Free To Use But Restricted, and License :: Freeware are mapped to the generic License: LicenseRef-Proprietary expression.
  • Classifiers License :: GUST* have no mapping to SPDX license ids for now and no package uses them in PyPI as of the writing of this PEP.

The remainder of the Classifiers using a License:: prefix map to a simple single license expression using the corresponding SPDX license identifiers.

When multiple license-related Classifiers are used, their relation is ambiguous and it is typically not possible to determine if all the licenses apply or if there is a choice that is possible among the licenses. In this case, tools cannot infer reliably a license expression to suggest using only the legacy Classifier usage.

Summary of Differences From PEP 566

  • Metadata-Version is now 2.2.
  • Added one new field: License-File
  • Updated the documentation of two fields: License and Classifiers

Backwards Compatibility

The reuse of the License field means that we keep backward compatibility. The specification of the License File(s) field is only writing down the practices of the wheels and setuptools tools and is backward compatibile with their support for that field.

The "soft" validation of the License field when it does not contain a valid license expression and when legacy license-related Classifiers are used means that we can gently prepare users for a possible strict and incompatible validation of these fields in the future.

Security Implications

This PEP has no foreseen security implications: the License field is a plain string and the License-File(s) are file paths. None of them introduces any new security concern.

How to Teach Users to use License Expressions

The simple cases are simple: a single license id is a valid license expression and a large majority of packages use a single license.

The plan to teach users of packaging tools how to use the license with a valid license expressions is to have tool issue warning messages when they detect an incorrect license expressions or when a license-related classifier is used in the Classifier field.

With a warning message that does not terminate processing, publishing tools will gently teach users on how to provide correct license expressions over time.

Tools may also help with the conversion and suggest a license expression in some cases:

  1. The section Mapping legacy Classifiers to new License expressions provides tools authors with guidelines on how to suggest a license expression from legacy Classifiers.
  2. Tools may also be able to infer and suggest how to update an existing incorrect License value and convert that to a correct license expression. For instance a tool may suggest to correct a License field from Apache2 (which is not a valid license expression as defined in this PEP) to Apache-2.0 (which is a valid license expression using an SPDX license id as defined in this PEP).

Reference Implementation

Tools will need to support parsing and validating License Expressions in the License field.

The license-expression library [11] is a reference Python implementation for a library that handles License Expressions including parsing, validating and formatting License Expressions using flexible lists of license symbols (including SPDX license ids and any extra ids referenced here). It is licensed under the Apache-2.0 license and is used in a few projects such as the SPDX Python tools [12], the ScanCode toolkit [13] and the Free Software Foundation Europe (FSFE) Reuse project [10].

Rejected ideas

  1. use a new License Expression field and deprecate the License field.

Adding a new field would introduce backward incompatible changes when the License field would be retired later and require to have a more complex validation. The use of such a field would further introduce a new concept that is not seen anywhere else in any other package metadata (e.g. a new a field only for license expression) and possibly be a source of confusion. Alos, users are less likely to start using a new field than make small adjustments to their use of existing fields.

  1. mapping licenses used in the license expression to specific files in the license files (or vice versa).

This would require using a mapping (two parallel lists would be too prone to alignment errors) and a mapping would bring extra complication to how license are documented by adding an additional nesting level.

A mapping would be needed as you cannot guarantee that all expressions (e.g. a GPL with an exception may be in a single file) or all the license keys have a single license file and that any expression does not have more than one. (e.g. an Apache license LICENSE and its NOTICE file for instance are tow distinct file). Yet in most cases, there is a simpler one license, one or more license files. In the rarer and more complex cases where there are many licenses involved you can still use the proposed conventions at the cost of a slight loss of clarity by not specifying which text file is for which license id, but you are not forcing the more complex data model (e.g. a mapping) on everyone that may not need it.

We could of course have data field with multiple possible value types (it’s a string, it’s a list, it’s a mapping!) but this could be a source of confusion. This is what has been done for instance in npm (historically) and in Rubygems (still today) and as result you need to test the type of the metadata field before using it in code and users are confused about when to use a list or a string.

  1. mapping licenses to specific source files and/or directories of source files (or vice versa).

File-level notices is not considered as part of the scope of this PEP and the existing the SPDX-License-Identifier [59] convention can be used and may not need further specification as a PEP.

Appendix 1. License Expression example

The current version of setuptools metadata [20] does not use the License field. It uses instead these license-related information:

license_file = LICENSE
classifiers =
    License :: OSI Approved :: MIT License

The simplest migration to this PEP would consist in using this instead:

license = MIT
license_files =
    LICENSE

Another possibility would be to include the licenses of the third-party packages bundled in that are vendored in the setuptools/_vendor/ and pkg_resources/_vendor directories:

appdirs==1.4.3
packaging==16.8
pyparsing==2.2.1
six==1.10.0

These are using these license expressions:

appdirs: MIT
pyparsing: MIT
six: MIT
packaging: Apache-2.0 OR BSD-2-Clause

Therefore, a comprehensive license documentation covering both setuptools proper and its vendored packages could contain these metadata, combining all the license expressions in one expression:

license = MIT AND (Apache-2.0 OR BSD-2-Clause)
license_files =
    LICENSE.MIT
    LICENSE.packaging

Here we would assume that the LICENSE.MIT file contains the text of the MIT license used by setuptools, appdirs, pyparsing and six, and that the LICENSE.packaging file contains the texts of the Apache and BSD license and its license choice notice [21].

Appendix 2. Surveying how we document licenses today in Python

There are multiple ways used or recommended to document Python package licenses today:

In Core metadata

There are two overlapping Core metadata fields to document a license: the license-related Classifiers strings [5] prefixed with License:: and the License field as free text [14].

The Core metadata documentation License field documentation is currently:

License (optional)
::::::::::::::::::

Text indicating the license covering the distribution where the license
is not a selection from the "License" Trove classifiers. See
"Classifier" below.  This field may also be used to specify a
particular version of a license which is named via the ``Classifier``
field, or to indicate a variation or exception to such a license.

Examples::

    License: This software may only be obtained by sending the
            author a postcard, and then the user promises not
            to redistribute it.

    License: GPL version 3, excluding DRM provisions

Even though there are two fields, it is at times difficult to convey anything but simpler licensing. For instance some Classifiers lack accuracy (GPL without a version) and when you have multiple License-related classifiers it is not clear if this is a choice or all these apply and which ones. Furthermore, the list of available license-related Classifiers is often out-of-date.

In the pypa sample project

The latest pypa sample project recommends only to use Classifiers in setup.py and does not list the license field in its example setup.py [15].

The License files in wheels and setuptools

Beyond a license code or qualifier, license text files are documented and included in a built package either implicitly or explicitly and this is another possible source of confusion:

  • In wheels [9] license files are automatically added to the .dist-info directory if they match one of a few common license file name patterns (e.g. LICENSE, COPYING). Alternatively a package author can specify a list of license files paths to include in the built whell using in the license_files field in the [metadata] section of the project's setup.cfg. Previously this was a (singular) license_file file attribute that is now deprecated but this is still in common use. See [16] for instance.
  • In setuptools [17], a license_file attribute is use to add a single license file to a source distribution. This singular version is still honored by wheels for backward compability.
  • Using a LICENSE.txt file is encouraged in the packaging guide [18] paired with a MANIFEST.in entry to ensure that the license file is included in a built source distribution (sdist).

Note: the License-File(s) field proposed in this already exists in wheel and setuptools with the same behaviour as explained above. This PEP is only recognizing and documenting the existing practice as used in wheels (with the license_file and license_files setup.cfg [metadata] entries) and in setuptools license_file setup() argument.

In Python code files

(Note: Documenting licenses in source code is not in the scope of this PEP)

Beside using comments and/or SPDX-License-Identifier conventions, the license is sometimes documented in Python code file using dunder variables typically named after one of the lower cased Core metadata field such as __license__ [19].

This convention (dunder global variables) is recognized by the built-in help() function and the standard pydoc module. The dunder variable(s) will show up in the help() DATA section for a module.

In some other packaging tools

  • Conda package manifest [22] has support for license and`license_file` fields as well as a license_family license grouping field.
  • flit [23] recommends to use Classifiers instead of License (as per the current metadata spec).
  • pbr [25] uses similar data as setuptools but always stored setup.cfg.
  • poetry [24] specifies the use of the license ` field in `pyproject.toml with SPDX license ids.

Appendix 3. Surveying how other package formats document licenses

Here is a survey of how things are done elsewhere.

License in Linux distribution packages

Note: in most cases the license texts of the most common licenses are included globally once in a shared documentation directory (e.g. /usr/share/doc).

  • Debian document package licenses with machine readable copyright files [26]. This specification defines its own license expression syntax that is very similar to the SDPX syntax and use its own list of license identifiers for common licenses also closely related to SPDX ids.
  • Fedora RPM packages [27] specifies how to include License Texts [28] and how use a License field [29] that must be filled with an appropriate license Short License identifier(s) from an extensive list of "Good Licenses" identifiers [30]. Fedora also defines ist own license expression syntax very similar to the SDPX syntax.
  • OpenSuse RPMs packages [31] use SPDX license expressions with a either SPDX license ids and a list of extra license ids [32].
  • Gentoo ebuild use a LICENSE variable [33]. This field is specified in GLEP-0023 [34] and in the Gentoo development manual [35]. Gentoo also defines a license expressions syntax and a list of allowed licenses. The expression syntax is rather different from SPDX.
  • FreeBSD package Makefile [36] provide a LICENSE and a LICENSE_FILE field with a list of custom license symbols. For non-standard licenses, FreeBSD recommend to use LICENSE=UNKNOWN and add LICENSE_NAME and LICENSE_TEXT fields, as well as sophisticated LICENSE_PERMS to qualify the license permissoins and LICENSE_GROUPS to document a license grouping. The LICENSE_COMB allows to document more than one license and how they apply together, forming a custom license expression syntax. FreeBSD also recommends the use of SPDX-License-Identifier in source code files.
  • Archlinux PKGBUILD [37] define its own license identifiers [38]. 'unknown' can be used if the license is not defined.
  • OpenWRT ipk packages [39] use the PKG_LICENSE and PKG_LICENSE_FILES variables and recommend the use of SPDX License ids.
  • NixOS uses SPDX identifiers [40] and some extras license identifiers in its license field.
  • GNU Guix (based on NixOS) has a single License field, uses its own license symbols list [41] and specifies to use one license or a list of licenses [42].
  • Alpine Linux apk packages [43] recommend using SPDX identifiers in its license field.

License in Language and Application packages

  • In Java, Maven POM [44] defines a licenses XML tag with a list of license items each with name, url, comments and "disribution" type. This is not mandatory and the content of each field is not specified.
  • JavaScript npm package.json [45] use a single license field with SPDX license expression or the UNLICENSED id if no license is specified. A license file can be referenced as an alternative using "SEE LICENSE IN <filename>" in the single license field.
  • Rubygems gemspec [46] specifies either a singular license string for a list of licenses strings. The relationship between multiple licenses in a list is not specified. They recommend using SPDX license ids.
  • CPAN Perl modules [47] use a single license field wich is either a single string or a list of strings. The relationship between the licenses in a list is not specified. There is a list of support own license identifiers plus these generic ids: open_source, restricted, unrestricted, unknown.
  • Rust Cargo [48] specifies the use an SPDX license expession (v2.1) in the license field. They also support an alternative expression synatx using slash- separated SPDX license ids. There is a license_file field too. The crates.io package registry [49] requires that either license or license_file fields are set when you upload a package.
  • PHP Composer composer.json [50] uses a license field with an SPDX License id or "proprietary". The License field is either a single string that can use something which resemble SPDX license expression syntax with "and" and "or" keywords; or this is a list of strings if there is a choice of licenses (aka. a "disjunctive" choice of license).
  • NuGet packages [51] were using only a simple license URL and are now specifying to use an SPDX License expressions and/or the path to a license file within the package. The NuGet.org repository states that they only accepts license expressions that are approved by the Open Source Initiative or the Free Software Foundation.
  • Golang has no provision for any metadata beyond dependencies. Licensing information is left to community package managers.
  • Dart/Flutter spec [52] recommends to use a single LICENSE file that should contain multiple license texts each separated by a line with 80 hyphens.
  • JavaScript Bower [53] license field is either a single string or a list of strings using either SPDX license identifier or a path or a URL to a license file.
  • Cocoapods podspec [54] license is either a single string or a mapping with type, file an text keys. This is mandatory unless there is a LICENSE or LICENCE fie provided.
  • Haskell Cabal [55] accepts an SPDX license expression since version 2.2. The version of the SPDX license list used is a function of the cabal version. The specification also provides a mapping between pre-SPDX Legacy license Identifiers and SPDX ids. Cabal also specifies a license-file(s) field that list license files that will be installed with the package.
  • Erlang/Elixir mix/hex package [56] specifies a licenses field as a required list of license srtings and recommends to use SPDX License ids.
  • D lang dub packages [57] define their own list of license identifiers and their own license expression syntax: both are very similar to SPDX conventions.
  • R Package DESCRIPTION [58] defines its own sophisticated license expression syntax and list of licenses. R has a unique way to support specifiers for license versions such as LGPL (>= 2.0, < 3) in its license expression syntax.

Conventions used by other ecosystems

  • SPDX-License-Identifier [59] is simple convention to document the license inside a code file.
  • The Free Software Foundation (FSF) promotes using SPDX license ids for clarity in the GPL and other versioned free software licenses [60] [61].
  • The Free Software Foundation Europe (FSFE) Reuse project [10] promotes using SPDX-License-Identifier.
  • The Linux kernel uses SPDX-License-Identifier and parts of the FSFE Reuse conventions to document its license(s) [62].
  • U-Boot spearheaded using SPDX license identifiers in code and now follows the Linux ways [63].
  • The Apache Software Foundation projects use RDF DOAP [64] with a single license field pointing to SPDX license ids.
  • The Eclipse Foundation promotes using SPDX-license-Identifiers [65]
  • The ClearlyDefined project [3] promotes using SPDX license ids and expressions to improve license clarity.
  • The Android Open Source Project use MODULE_LICENSE_XXX empty tag files where XXX is a license code such as BSD [66], APACHE, GPL, etc. a NOTICE file for license text.

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.
[1](1, 2, 3) https://packaging.python.org/specifications/core-metadata
[2]https://clearlydefined.io/stats
[3](1, 2) https://clearlydefined.io
[4]http://opensource.org
[5](1, 2) https://pypi.org/classifiers
[6](1, 2, 3) https://spdx.org/licenses
[7]https://spdx.org
[8]https://spdx.org/spdx-specification-21-web-version#h.jxpfx0ykyb60
[9]https://github.com/pypa/wheel/blob/b8b21a5720df98703716d3cd981d8886393228fa/docs/user_guide.rst#including-license-files-in-the-generated-wheel-file
[10](1, 2) https://reuse.software/
[11]https://github.com/nexB/license-expression/
[12]https://github.com/spdx/tools-python/
[13]https://github.com/nexB/scancode-toolkit
[14]https://packaging.python.org/guides/distributing-packages-using-setuptools/?highlight=MANIFEST.in#license
[15]https://github.com/pypa/sampleproject/blob/b0d3f3eeef4e5668d7b59448b43c0f1914d9afc6/setup.py#L103
[16]https://github.com/pypa/pip/blob/476606425a08c66b9c9d326994ff5cf3f770926a/setup.cfg#L40
[17]https://github.com/pypa/setuptools/blob/97e8ad4f5ff7793729e9c8be38e0901e3ad8d09e/setuptools/command/sdist.py#L202
[18]https://packaging.python.org/guides/distributing-packages-using-setuptools/?highlight=MANIFEST.in#license-txt
[19]https://github.com/search?l=Python&q=%22__license__%22&type=Code
[20]https://github.com/pypa/setuptools/blob/v41.2.0/setup.cfg#L20
[21]https://github.com/pypa/packaging/blob/19.1/LICENSE
[22]https://docs.conda.io/projects/conda-build/en/latest/resources/define-metadata.html#about-section
[23]https://github.com/takluyver/flit
[24]https://poetry.eustace.io/docs/pyproject/#license
[25]https://docs.openstack.org/pbr/latest/user/features.html
[26]https://dep-team.pages.debian.net/deps/dep5/
[27]https://docs.fedoraproject.org/en-US/packaging-guidelines/LicensingGuidelines/
[28]https://docs.fedoraproject.org/en-US/packaging-guidelines/LicensingGuidelines/#_license_text
[29]https://docs.fedoraproject.org/en-US/packaging-guidelines/LicensingGuidelines/#_valid_license_short_names
[30]https://fedoraproject.org/wiki/Licensing:Main?rd=Licensing#Good_Licenses
[31]https://en.opensuse.org/openSUSE:Packaging_guidelines#Licensing
[32]https://docs.google.com/spreadsheets/d/14AdaJ6cmU0kvQ4ulq9pWpjdZL5tkR03exRSYJmPGdfs/pub
[33]https://devmanual.gentoo.org/ebuild-writing/variables/index.html#license
[34]https://www.gentoo.org/glep/glep-0023.html
[35]https://devmanual.gentoo.org/general-concepts/licenses/index.html
[36]https://www.freebsd.org/doc/en_US.ISO8859-1/books/porters-handbook/licenses.html
[37]https://wiki.archlinux.org/index.php/PKGBUILD#license
[38]https://wiki.archlinux.org/index.php/PKGBUILD#license
[39]https://openwrt.org/docs/guide-developer/packages#buildpackage_variables
[40]https://github.com/NixOS/nixpkgs/blob/master/lib/licenses.nix
[41]http://git.savannah.gnu.org/cgit/guix.git/tree/guix/licenses.scm
[42]https://guix.gnu.org/manual/en/html_node/package-Reference.html#index-license_002c-of-packages
[43]https://wiki.alpinelinux.org/wiki/Creating_an_Alpine_package#license
[44]https://maven.apache.org/pom.html#Licenses
[45]https://docs.npmjs.com/files/package.json#license
[46]https://guides.rubygems.org/specification-reference/#license=
[47]https://metacpan.org/pod/CPAN::Meta::Spec#license
[48]https://doc.rust-lang.org/cargo/reference/manifest.html#package-metadata
[49]https://doc.rust-lang.org/cargo/reference/registries.html#publish
[50]https://getcomposer.org/doc/04-schema.md#license
[51]https://docs.microsoft.com/en-us/nuget/reference/nuspec#licenseurl
[52]https://flutter.dev/docs/development/packages-and-plugins/developing-packages#adding-licenses-to-the-license-file
[53]https://github.com/bower/spec/blob/master/json.md#license
[54]https://guides.cocoapods.org/syntax/podspec.html#license
[55]https://cabal.readthedocs.io/en/latest/developing-packages.html#pkg-field-license
[56]https://hex.pm/docs/publish
[57]https://dub.pm/package-format-json.html#licenses
[58]https://cran.r-project.org/doc/manuals/r-release/R-exts.html#Licensing
[59](1, 2) https://spdx.org/using-spdx-license-identifier
[60]https://www.gnu.org/licenses/identify-licenses-clearly.html
[61]https://www.fsf.org/blogs/rms/rms-article-for-claritys-sake-please-dont-say-licensed-under-gnu-gpl-2
[62]https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/tree/Documentation/process/license-rules.rst
[63]https://www.denx.de/wiki/U-Boot/Licensing
[64]https://svn.apache.org/repos/asf/allura/doap_Allura.rdf
[65]https://www.eclipse.org/legal/epl-2.0/faq.php
[66]https://github.com/aosp-mirror/platform_external_tcpdump/blob/master/MODULE_LICENSE_BSD
[67]https://creativecommons.org/publicdomain/zero/1.0/
[68]https://unlicense.org/

Copyright

This document is placed in the public domain or under the CC0-1.0-Universal license [67], whichever is more permissive.

Acknowledgements

  • Nick Coghlan
  • Kevin P. Fleming
  • Pradyun Gedam
  • Oleg Grenrus
  • Dustin Ingram
  • Chris Jerdonek
  • Cyril Roelandt
  • Luis Villa