Skip to content

Commit 28e262b

Browse files
committed
Document legacy pyproject.toml license specification
Cleary mark it as legacy and replaced by PEP 639.
1 parent 59b55cf commit 28e262b

File tree

1 file changed

+14
-1
lines changed

1 file changed

+14
-1
lines changed

source/specifications/pyproject-toml.rst

Lines changed: 14 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -259,8 +259,21 @@ Text string that is a valid SPDX
259259
as specified in :doc:`/specifications/license-expression`.
260260
Tools SHOULD validate and perform case normalization of the expression.
261261

262-
The table subkeys of the ``license`` key are deprecated.
262+
Legacy specification
263+
''''''''''''''''''''
263264

265+
- TOML_ type: table
266+
- Corresponding :ref:`core metadata <core-metadata>` field:
267+
:ref:`License <core-metadata-license>`
268+
269+
The table may have one of two keys. The ``file`` key has a string
270+
value that is a file path relative to ``pyproject.toml`` to the file
271+
which contains the license for the project. Tools MUST assume the
272+
file's encoding is UTF-8. The ``text`` key has a string value which is
273+
the license of the project. These keys are mutually exclusive, so a
274+
tool MUST raise an error if the metadata specifies both keys.
275+
276+
The table subkeys were deprecated by :pep:`639` in favor of the string value.
264277

265278
.. _pyproject-toml-license-files:
266279

0 commit comments

Comments
 (0)