Skip to content
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 10 additions & 4 deletions source/guides/writing-pyproject-toml.rst
Original file line number Diff line number Diff line change
Expand Up @@ -323,11 +323,13 @@ You can also specify the format explicitly, like this:
``license`` and ``license-files``
---------------------------------

As per :pep:`639`, licenses should be declared with two fields:
:pep:`639` defines two fields for modern license metadata. They serve
different purposes and can be used independently:
Comment thread
rgommers marked this conversation as resolved.
Resolved

- ``license`` is an :term:`SPDX license expression <License Expression>`
- ``license`` declares an :term:`SPDX license expression <License Expression>`
consisting of one or more :term:`license identifiers <License Identifier>`.
- ``license-files`` is a list of license file glob patterns.
- ``license-files`` declares the license and other legal files that should be
included in distribution metadata, using a list of glob patterns.
Comment thread
rgommers marked this conversation as resolved.
Resolved

A previous PEP had specified ``license`` to be a table with a ``file`` or a
``text`` key, this format is now deprecated. Most :term:`build backends<build
Expand All @@ -343,12 +345,16 @@ backend>` now support the new format as shown in the following table.
- poetry-core
- uv-build
* - 1.27.0
- 77.0.3
- 77.0.0
Comment thread
rgommers marked this conversation as resolved.
Resolved
- 3.12
- 2.4.0
- 2.2.0
- 0.7.19

The table records the first backend release that introduced :pep:`639`
support; it is not a recommendation to pin projects to those historical
versions. Prefer a current supported backend release when possible.


.. _license:

Expand Down
Loading