Skip to content

Commit a67a0e6

Browse files
committed
Cover pyproject.toml -> PKG-INFO -> METADATA explicitly
1 parent a1bef1e commit a67a0e6

3 files changed

Lines changed: 23 additions & 13 deletions

File tree

‎source/specifications/binary-distribution-format.rst‎

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -228,6 +228,8 @@ The layout offers a superset of the functionality provided by the existing
228228
wininst and egg binary formats.
229229

230230

231+
.. _the-dist-info-directory:
232+
231233
The .dist-info directory
232234
^^^^^^^^^^^^^^^^^^^^^^^^
233235

‎source/specifications/pyproject-toml.rst‎

Lines changed: 19 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -107,19 +107,25 @@ Declaring project metadata: the ``[project]`` table
107107

108108
The ``[project]`` table specifies the project's :ref:`core metadata <core-metadata>`.
109109

110-
There are two kinds of metadata: *static* and *dynamic*. Static
111-
metadata is specified in the ``pyproject.toml`` file directly and
112-
cannot be specified or changed by a tool (this includes data
113-
*referred* to by the metadata, e.g. the contents of files referenced
114-
by the metadata). Dynamic metadata is listed via the ``dynamic`` key
115-
(defined later in this specification) and represents metadata that a
116-
tool will later provide.
117-
118-
A key whose value is a list or a table of arbitrary entries MAY be
119-
specified statically *and* listed in ``dynamic`` at the same time. In
120-
that case the entries given statically are fixed and a build back-end
121-
MAY only *append* further entries to them; the back-end MUST NOT
122-
remove, reorder, or modify any statically-specified entries. See the
110+
There are two kinds of metadata: *static* and *dynamic*.
111+
112+
Static metadata is specified in the ``pyproject.toml`` file directly and MUST
113+
NOT be changed by tools. Source distributions and wheels built for this project
114+
MUST have semantically equivalent values in
115+
:ref:`PKG-INFO <source-distribution-file-format>` (source distribution
116+
metadata) and :ref:`METADATA <the-dist-info-directory>` (wheel metadata). For
117+
example, ``Foo`` and ``foo`` as distribution name as well as ``>=2,<3`` and
118+
``<3,>=2`` as version specifiers are semantically equivalent. This mandate
119+
includes data *referred* to by the metadata, e.g. the contents of files
120+
referenced by the metadata MUST NOT be changed.
121+
122+
Dynamic metadata is listed via the ``dynamic`` key (defined later in this
123+
specification) and represents metadata that a tool will later provide. A key
124+
whose value is a list or a table of arbitrary entries MAY be specified
125+
statically *and* listed in ``dynamic`` at the same time. In that case the
126+
entries given statically are fixed and a build back-end MAY only *append*
127+
further entries to them; the back-end MUST NOT remove, reorder, or modify any
128+
statically-specified entries. See the
123129
:ref:`dynamic <pyproject-toml-dynamic>` key for details.
124130

125131
The lack of a ``[project]`` table implicitly means the :term:`build backend <Build Backend>`

‎source/specifications/source-distribution-format.rst‎

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -55,6 +55,8 @@ by the ``.tar.gz`` suffix and the presence of precisely *one* hyphen in the file
5555
Code that does this may then use the distribution name and version from the filename
5656
without further verification.
5757

58+
.. _source-distribution-file-format:
59+
5860
Source distribution file format
5961
===============================
6062

0 commit comments

Comments
 (0)