Skip to content

Commit 083e986

Browse files
committed
Clarify that the Dynamic metadata field only applies when building from sdist
1 parent 4cfc8b9 commit 083e986

File tree

1 file changed

+16
-0
lines changed

1 file changed

+16
-0
lines changed

source/specifications/core-metadata.rst

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -133,6 +133,18 @@ only, and indicates that the field value was calculated at wheel build time,
133133
and may not be the same as the value in the sdist or in other wheels for the
134134
project.
135135

136+
Note in particular that if you have a wheel, you cannot assume that a field
137+
which is not marked as ``Dynamic`` will have the same value in other wheels, as
138+
some wheels are not built directly from the sdist, but are modified from
139+
existing wheels (the ``cibuildwheel`` tool does this, for example). Such
140+
modifications *could* include changing metadata (even non-dynamic metadata).
141+
Similarly, if you have a sdist and a wheel which you didn't build from that
142+
sdist, you cannnot assume that the wheel's metadata matches that of the sdist,
143+
even if the field is not marked as ``Dynamic``.
144+
145+
It is advisable, but not required, that tools which modify wheel metadata add
146+
the modified fields to the generated wheel's ``Dynamic`` field.
147+
136148
Full details of the semantics of ``Dynamic`` are described in :pep:`643`.
137149

138150
.. _core-metadata-platform:
@@ -923,6 +935,10 @@ Example::
923935
History
924936
=======
925937

938+
- August 2025: Clarified that ``Dynamic`` only affects how fields
939+
must be treated when building a wheel from a sdist, not when modifying
940+
a wheel.
941+
926942
- August 2024: Core metadata 2.4 was approved through :pep:`639`.
927943

928944
- Added the ``License-Expression`` field.

0 commit comments

Comments
 (0)