Skip to content

Commit a1bef1e

Browse files
committed
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.
1 parent 736275c commit a1bef1e

1 file changed

Lines changed: 5 additions & 1 deletion

File tree

‎source/specifications/core-metadata.rst‎

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -122,7 +122,11 @@ When found in the metadata of a source distribution, the following
122122
rules apply:
123123

124124
1. If a field is *not* marked as ``Dynamic``, then the value of the field
125-
in any wheel built from the sdist MUST match the value in the sdist.
125+
in any wheel built from the sdist MUST be semantically equivalent to the
126+
value in the sdist. For example, ``Foo`` and ``foo`` as distribution name
127+
as well as ``>=2,<3`` and ``<3,>=2`` as version specifiers are semantically
128+
equivalent.
129+
126130
If the field is not in the sdist, and not marked as ``Dynamic``, then
127131
it MUST NOT be present in the wheel.
128132
2. If a single-use field is marked as ``Dynamic``, it may contain any valid

0 commit comments

Comments
 (0)