diff --git a/source/guides/writing-pyproject-toml.rst b/source/guides/writing-pyproject-toml.rst index a983f6a35..4c0d00598 100644 --- a/source/guides/writing-pyproject-toml.rst +++ b/source/guides/writing-pyproject-toml.rst @@ -333,22 +333,25 @@ 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`` specifies glob patterns matching license files and other + legal notices to include in distribution archives. 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 supporting the standardized license fields :header-rows: 1 * - hatchling - setuptools - - flit-core [#flit-core-pep639]_ + - flit-core - pdm-backend - poetry-core - uv-build @@ -359,6 +362,9 @@ backend>` now support the new format as shown in the following table. - 2.2.0 - 0.7.19 +The table lists minimum backend versions for these fields; prefer a current +supported backend release when possible. + .. _license: @@ -618,9 +624,6 @@ A full example like ``requires-python = "<= 3.10"`` here. `This blog post `_ contains some information regarding possible problems. -.. [#flit-core-pep639] flit-core `does not yet `_ support WITH in SPDX license expressions. - -.. _flit-issue-735: https://github.com/pypa/flit/issues/735 .. _gfm: https://docs.github.com/en/get-started/writing-on-github/getting-started-with-writing-and-formatting-on-github/basic-writing-and-formatting-syntax .. _setuptools: https://setuptools.pypa.io .. _poetry: https://python-poetry.org