Skip to content

Commit b466436

Browse files
committed
Document inclusion of license files in the sdist per PEP 639
1 parent b554032 commit b466436

File tree

1 file changed

+8
-1
lines changed

1 file changed

+8
-1
lines changed

source/specifications/source-distribution-format.rst

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -58,10 +58,15 @@ A ``.tar.gz`` source distribution (sdist) contains a single top-level directory
5858
called ``{name}-{version}`` (e.g. ``foo-1.0``), containing the source files of
5959
the package. The name and version MUST match the metadata stored in the file.
6060
This directory must also contain a :file:`pyproject.toml` in the format defined in
61-
:ref:`pyproject-toml-spec`, and a ``PKG-INFO`` file containing
61+
:ref:`pyproject-toml-spec`, and a :file:`PKG-INFO` file containing
6262
metadata in the format described in the :ref:`core-metadata` specification. The
6363
metadata MUST conform to at least version 2.2 of the metadata specification.
6464

65+
If the metadata version is 2.4 or greater, the source distribution MUST contain
66+
any license files specified by the ``License-File`` field in the :file:`PKG-INFO`
67+
at their respective paths relative to the root directory of the sdist
68+
(containing the :file:`pyproject.toml` and the :file:`PKG-INFO` metadata).
69+
6570
No other content of a sdist is required or defined. Build systems can store
6671
whatever information they need in the sdist to build the project.
6772

@@ -150,3 +155,5 @@ History
150155
:pep:`625`.
151156
* August 2023: Source distribution archive features were standardized through
152157
:pep:`721`.
158+
* December 2024: License files inclusion into source distribution was standardized
159+
through :pep:`639`.

0 commit comments

Comments
 (0)