diff --git a/source/specifications/binary-distribution-format.rst b/source/specifications/binary-distribution-format.rst index b2814f50c..f4bf30fa9 100644 --- a/source/specifications/binary-distribution-format.rst +++ b/source/specifications/binary-distribution-format.rst @@ -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 ^^^^^^^^^^^^^^^^^^^^^^^^ diff --git a/source/specifications/core-metadata.rst b/source/specifications/core-metadata.rst index 3d06e9ab6..d979a82fd 100644 --- a/source/specifications/core-metadata.rst +++ b/source/specifications/core-metadata.rst @@ -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 diff --git a/source/specifications/pyproject-toml.rst b/source/specifications/pyproject-toml.rst index ac4f10edc..40aa2c411 100644 --- a/source/specifications/pyproject-toml.rst +++ b/source/specifications/pyproject-toml.rst @@ -107,19 +107,25 @@ Declaring project metadata: the ``[project]`` table The ``[project]`` table specifies the project's :ref:`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 +metadata) and :ref:`METADATA ` (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 ` key for details. The lack of a ``[project]`` table implicitly means the :term:`build backend ` diff --git a/source/specifications/source-distribution-format.rst b/source/specifications/source-distribution-format.rst index 569173f9d..71103f340 100644 --- a/source/specifications/source-distribution-format.rst +++ b/source/specifications/source-distribution-format.rst @@ -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 ===============================