From bdee98facbc8e4e266f6699e43a8b229f04d205b Mon Sep 17 00:00:00 2001 From: Harshit Sharma <66710144+harshitethic@users.noreply.github.com> Date: Sat, 26 Sep 2026 10:57:13 +0530 Subject: [PATCH 1/3] docs: clarify PEP 639 license field semantics --- source/guides/writing-pyproject-toml.rst | 14 ++++++++++---- 1 file changed, 10 insertions(+), 4 deletions(-) diff --git a/source/guides/writing-pyproject-toml.rst b/source/guides/writing-pyproject-toml.rst index a0ff484f1..e1ab988f9 100644 --- a/source/guides/writing-pyproject-toml.rst +++ b/source/guides/writing-pyproject-toml.rst @@ -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: -- ``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. - 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 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: From 6b60f12d58e88957295dd5fc688c331629fed241 Mon Sep 17 00:00:00 2001 From: Harshit Sharma <66710144+harshitethic@users.noreply.github.com> Date: Tue, 29 Sep 2026 20:58:43 +0530 Subject: [PATCH 2/3] docs: link license guidance to core metadata spec --- source/guides/writing-pyproject-toml.rst | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/source/guides/writing-pyproject-toml.rst b/source/guides/writing-pyproject-toml.rst index e1ab988f9..0a5d594df 100644 --- a/source/guides/writing-pyproject-toml.rst +++ b/source/guides/writing-pyproject-toml.rst @@ -323,8 +323,9 @@ You can also specify the format explicitly, like this: ``license`` and ``license-files`` --------------------------------- -:pep:`639` defines two fields for modern license metadata. They serve -different purposes and can be used independently: +The :ref:`Core Metadata specification ` defines two fields +for modern license metadata. They serve different purposes and can be used +independently: - ``license`` declares an :term:`SPDX license expression ` consisting of one or more :term:`license identifiers `. From f073eecd912a036ca73c554a6e9b202df27e35cb Mon Sep 17 00:00:00 2001 From: Harshit Sharma <66710144+harshitethic@users.noreply.github.com> Date: Sat, 10 Oct 2026 21:31:21 +0530 Subject: [PATCH 3/3] docs: cite canonical Core Metadata license specification --- source/guides/writing-pyproject-toml.rst | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/source/guides/writing-pyproject-toml.rst b/source/guides/writing-pyproject-toml.rst index 0a5d594df..a57ac4b6b 100644 --- a/source/guides/writing-pyproject-toml.rst +++ b/source/guides/writing-pyproject-toml.rst @@ -336,7 +336,7 @@ 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 @@ -352,9 +352,10 @@ backend>` now support the new format as shown in the following table. - 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. +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: