Skip to content

Commit

Permalink
Clarity the meaning of "match" between sdist and wheel
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
konstin committed Aug 25, 2024
1 parent 63993ba commit b6eb06f
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion source/specifications/core-metadata.rst
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit b6eb06f

Please sign in to comment.