Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions source/specifications/binary-distribution-format.rst
Original file line number Diff line number Diff line change
Expand Up @@ -228,6 +228,8 @@ The layout offers a superset of the functionality provided by the existing
wininst and egg binary formats.


.. _the-dist-info-directory:

The .dist-info directory
^^^^^^^^^^^^^^^^^^^^^^^^

Expand Down
6 changes: 5 additions & 1 deletion source/specifications/core-metadata.rst
Original file line number Diff line number Diff line change
Expand Up @@ -122,7 +122,11 @@ When found in the metadata of a source distribution, the following
rules apply:

1. If a field is *not* marked as ``Dynamic``, then the value of the field
in any wheel built from the sdist MUST match the value in the sdist.
in any wheel built from the sdist MUST be semantically equivalent to the
value in the sdist. For example, ``Foo`` and ``foo`` as distribution name
as well as ``>=2,<3`` and ``<3,>=2`` as version specifiers are semantically
equivalent.

If the field is not in the sdist, and not marked as ``Dynamic``, then
it MUST NOT be present in the wheel.
2. If a single-use field is marked as ``Dynamic``, it may contain any valid
Expand Down
32 changes: 19 additions & 13 deletions source/specifications/pyproject-toml.rst
Original file line number Diff line number Diff line change
Expand Up @@ -107,19 +107,25 @@ Declaring project metadata: the ``[project]`` table

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

There are two kinds of metadata: *static* and *dynamic*. Static
metadata is specified in the ``pyproject.toml`` file directly and
cannot be specified or changed by a tool (this includes data
*referred* to by the metadata, e.g. the contents of files referenced
by the metadata). Dynamic metadata is listed via the ``dynamic`` key
(defined later in this specification) and represents metadata that a
tool will later provide.

A key whose value is a list or a table of arbitrary entries MAY be
specified statically *and* listed in ``dynamic`` at the same time. In
that case the entries given statically are fixed and a build back-end
MAY only *append* further entries to them; the back-end MUST NOT
remove, reorder, or modify any statically-specified entries. See the
There are two kinds of metadata: *static* and *dynamic*.

Static metadata is specified in the ``pyproject.toml`` file directly and MUST
NOT be changed by tools. Source distributions and wheels built for this project
MUST have semantically equivalent values in
:ref:`PKG-INFO <source-distribution-file-format>` (source distribution
metadata) and :ref:`METADATA <the-dist-info-directory>` (wheel metadata). For
example, ``Foo`` and ``foo`` as distribution name as well as ``>=2,<3`` and
``<3,>=2`` as version specifiers are semantically equivalent. This mandate
includes data *referred* to by the metadata, e.g. the contents of files
referenced by the metadata MUST NOT be changed.

Dynamic metadata is listed via the ``dynamic`` key (defined later in this
specification) and represents metadata that a tool will later provide. A key
whose value is a list or a table of arbitrary entries MAY be specified
statically *and* listed in ``dynamic`` at the same time. In that case the
entries given statically are fixed and a build back-end MAY only *append*
further entries to them; the back-end MUST NOT remove, reorder, or modify any
statically-specified entries. See the
:ref:`dynamic <pyproject-toml-dynamic>` key for details.

The lack of a ``[project]`` table implicitly means the :term:`build backend <Build Backend>`
Expand Down
2 changes: 2 additions & 0 deletions source/specifications/source-distribution-format.rst
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,8 @@ by the ``.tar.gz`` suffix and the presence of precisely *one* hyphen in the file
Code that does this may then use the distribution name and version from the filename
without further verification.

.. _source-distribution-file-format:

Source distribution file format
===============================

Expand Down