Skip to content

Commit 8b257b7

Browse files
committed
Document how to install .dist-info/licenses per PEP 639
1 parent 8149535 commit 8b257b7

File tree

1 file changed

+18
-0
lines changed

1 file changed

+18
-0
lines changed

source/specifications/recording-installed-packages.rst

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -66,6 +66,11 @@ The ``METADATA`` file is mandatory.
6666
All other files may be omitted at the installing tool's discretion.
6767
Additional installer-specific files may be present.
6868

69+
This ``.dist-info`` directory may contain the following directory, described in
70+
detail below:
71+
72+
* ``licenses``: contains license files.
73+
6974
.. note::
7075

7176
The :ref:`binary-distribution-format` specification describes additional
@@ -219,6 +224,17 @@ of requirement (i.e. name plus version specifier).
219224
Its detailed specification is at :ref:`direct-url`.
220225

221226

227+
The licenses subdirectory
228+
=========================
229+
230+
If the metadata version is 2.4 or greater and one or more License-File
231+
fields is specified, the ``.dist-info`` directory MUST contain a ``licenses``
232+
subdirectory which MUST contain the files listed in the License-File fields in
233+
the ``METADATA`` file at their respective paths relative to the licenses
234+
directory.
235+
Any files in this directory MUST be copied from wheels by the install tools.
236+
237+
222238
Intentionally preventing changes to installed packages
223239
======================================================
224240

@@ -259,3 +275,5 @@ History
259275
for the full definition.
260276
- September 2020: Various amendments and clarifications were approved through
261277
:pep:`627`.
278+
- November 2024: The .dist-info/licenses directory was specified through
279+
:pep:`639`.

0 commit comments

Comments
 (0)