diff --git a/source/guides/writing-pyproject-toml.rst b/source/guides/writing-pyproject-toml.rst index a0ff484f1..a57ac4b6b 100644 --- a/source/guides/writing-pyproject-toml.rst +++ b/source/guides/writing-pyproject-toml.rst @@ -323,17 +323,20 @@ You can also specify the format explicitly, like this: ``license`` and ``license-files`` --------------------------------- -As per :pep:`639`, licenses should be declared with two fields: +The :ref:`Core Metadata specification ` defines two fields +for modern license metadata. They serve different purposes and can be used +independently: -- ``license`` is an :term:`SPDX license expression ` +- ``license`` declares an :term:`SPDX license expression ` consisting of one or more :term:`license identifiers `. -- ``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. 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` now support the new format as shown in the following table. -.. list-table:: build backend versions that introduced :pep:`639` support +.. list-table:: build backend versions introducing the standardized license fields :header-rows: 1 * - hatchling @@ -343,12 +346,17 @@ 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 - 3.12 - 2.4.0 - 2.2.0 - 0.7.19 +The table records the first backend release implementing the license fields +in the :ref:`Core Metadata specification `; it is not +a recommendation to pin projects to those historical versions. Prefer a +current supported backend release when possible. + .. _license: