Skip to content

Commit bda6388

Browse files
befelemewebknjaz
andcommitted
Document inclusion of license files in the .dist-info/licenses per PEP 639
Co-authored-by: 🇺🇦 Sviatoslav Sydorenko (Святослав Сидоренко) <[email protected]>
1 parent da1977e commit bda6388

File tree

1 file changed

+13
-0
lines changed

1 file changed

+13
-0
lines changed

source/specifications/binary-distribution-format.rst

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -182,6 +182,7 @@ its version, e.g. ``1.0.0``, consist of:
182182
``purelib`` or ``platlib`` as specified in ``WHEEL``. ``purelib`` and
183183
``platlib`` are usually both ``site-packages``.
184184
#. ``{distribution}-{version}.dist-info/`` contains metadata.
185+
#. ``{distribution}-{version}.dist-info/licenses/`` contains license files.
185186
#. ``{distribution}-{version}.data/`` contains one subdirectory
186187
for each non-empty install scheme key not already covered, where
187188
the subdirectory name is an index into a dictionary of install paths
@@ -250,6 +251,16 @@ The .dist-info directory
250251
mentioned and correctly hashed in RECORD.
251252

252253

254+
The :file:`.dist-info/licenses/` directory
255+
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
256+
257+
If the metadata version is 2.4 or greater and one or more ``License-File``
258+
fields is specified, the :file:`.dist-info/` directory MUST contain a
259+
licenses subdirectory, which MUST contain the files listed in the
260+
``License-File`` fields in the METADATA file at their respective paths
261+
relative to the licenses directory.
262+
263+
253264
The .data directory
254265
^^^^^^^^^^^^^^^^^^^
255266

@@ -423,6 +434,8 @@ History
423434
- February 2013: This specification was approved through :pep:`427`.
424435
- February 2021: The rules on escaping in wheel filenames were revised, to bring
425436
them into line with what popular tools actually do.
437+
- November 2024: The .dist-info/licenses directory was specified through
438+
:pep:`639`.
426439

427440

428441
Appendix

0 commit comments

Comments
 (0)