Skip to content

Commit d844cdc

Browse files
authored
Merge pull request #1789 from brettcannon/patch-2
Clearly specify that the name and version should be normalized for `.dist-info` and `.data` directories in wheels
2 parents 11f13d0 + dbbc9b1 commit d844cdc

File tree

1 file changed

+11
-6
lines changed

1 file changed

+11
-6
lines changed

source/specifications/binary-distribution-format.rst

Lines changed: 11 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -150,10 +150,10 @@ this character cannot appear within any component. This is handled as follows:
150150
- In distribution names, any run of ``-_.`` characters (HYPHEN-MINUS, LOW LINE
151151
and FULL STOP) should be replaced with ``_`` (LOW LINE), and uppercase
152152
characters should be replaced with corresponding lowercase ones. This is
153-
equivalent to regular :ref:`name normalization <name-normalization>` followed by replacing ``-`` with ``_``.
154-
Tools consuming wheels must be prepared to accept ``.`` (FULL STOP) and
155-
uppercase letters, however, as these were allowed by an earlier version of
156-
this specification.
153+
equivalent to regular :ref:`name normalization <name-normalization>` followed
154+
by replacing ``-`` with ``_``. Tools consuming wheels must be prepared to accept
155+
``.`` (FULL STOP) and uppercase letters, however, as these were allowed by an earlier
156+
version of this specification.
157157
- Version numbers should be normalised according to the :ref:`Version specifier
158158
specification <version-specifiers>`. Normalised version numbers cannot contain ``-``.
159159
- The remaining components may not contain ``-`` characters, so no escaping
@@ -175,8 +175,11 @@ File contents
175175
'''''''''''''
176176

177177
The contents of a wheel file, where {distribution} is replaced with the
178-
name of the package, e.g. ``beaglevote`` and {version} is replaced with
179-
its version, e.g. ``1.0.0``, consist of:
178+
:ref:`normalized name <name-normalization>` of the package, e.g.
179+
``beaglevote`` and {version} is replaced
180+
with its :ref:`normalized version <version-specifiers-normalization>`,
181+
e.g. ``1.0.0``, (with dash/``-`` characters replaced with underscore/``_`` characters
182+
in both fields) consist of:
180183

181184
#. ``/``, the root of the archive, contains all files to be installed in
182185
``purelib`` or ``platlib`` as specified in ``WHEEL``. ``purelib`` and
@@ -440,6 +443,8 @@ History
440443
may vary between tools).
441444
- December 2024: The :file:`.dist-info/licenses/` directory was specified through
442445
:pep:`639`.
446+
- January 2025: Clarified that name and version needs to be normalized for
447+
``.dist-info`` and ``.data`` directories.
443448

444449

445450
Appendix

0 commit comments

Comments
 (0)