@@ -66,6 +66,11 @@ The ``METADATA`` file is mandatory.
6666All other files may be omitted at the installing tool's discretion.
6767Additional installer-specific files may be present.
6868
69+ This :file: `.dist-info/ ` directory may contain the following directory, described in
70+ detail below:
71+
72+ * :file: `licenses/ `: contains license files.
73+
6974.. note ::
7075
7176 The :ref: `binary-distribution-format ` specification describes additional
@@ -144,7 +149,7 @@ Here is an example snippet of a possible ``RECORD`` file::
144149 __pycache__/black.cpython-38.pyc,,
145150 __pycache__/blackd.cpython-38.pyc,,
146151 black-19.10b0.dist-info/INSTALLER,sha256=zuuue4knoyJ-UwPPXg8fezS7VCrXJQrAP7zeNuwvFQg,4
147- black-19.10b0.dist-info/LICENSE,sha256=nAQo8MO0d5hQz1vZbhGqqK_HLUqG1KNiI9erouWNbgA,1080
152+ black-19.10b0.dist-info/licenses/ LICENSE,sha256=nAQo8MO0d5hQz1vZbhGqqK_HLUqG1KNiI9erouWNbgA,1080
148153 black-19.10b0.dist-info/METADATA,sha256=UN40nGoVVTSpvLrTBwNsXgZdZIwoKFSrrDDHP6B7-A0,58841
149154 black-19.10b0.dist-info/RECORD,,
150155 black.py,sha256=45IF72OgNfF8WpeNHnxV2QGfbCLubV5Xjl55cI65kYs,140161
@@ -219,6 +224,17 @@ of requirement (i.e. name plus version specifier).
219224Its detailed specification is at :ref: `direct-url `.
220225
221226
227+ The :file: `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 :file: `.dist-info/ ` directory MUST contain a :file: `licenses/ `
232+ subdirectory which MUST contain the files listed in the ``License-File `` fields in
233+ the :file: `METADATA ` file at their respective paths relative to the
234+ :file: `licenses/ ` directory.
235+ Any files in this directory MUST be copied from wheels by the install tools.
236+
237+
222238Intentionally 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+ - December 2024: The :file: `.dist-info/licenses/ ` directory was specified through
279+ :pep: `639 `.
0 commit comments