From 197fbab3ff5b3dadc4146f318915840854f9dfb0 Mon Sep 17 00:00:00 2001 From: konstin Date: Sun, 25 Aug 2024 13:00:50 +0200 Subject: [PATCH] Clarity the meaning of "match" between sdist and wheel In the current version of the description of `Dynamic` in the core metadata, it is unclear whether "match" means string equivalence or semantic equivalence. Given that pypa/packaging is reordering version specifiers between sdist and wheel when used by a build backend (which to my best knowledge are all build backend written in python), we can clarify this to semantic equivalence. --- source/specifications/core-metadata.rst | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/source/specifications/core-metadata.rst b/source/specifications/core-metadata.rst index fb6570fbb..40fa3322e 100644 --- a/source/specifications/core-metadata.rst +++ b/source/specifications/core-metadata.rst @@ -116,7 +116,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 field is marked as ``Dynamic``, it may contain any valid value in