Skip to content

Add PEP 770 to specifications #1853

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 2 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
20 changes: 20 additions & 0 deletions source/specifications/binary-distribution-format.rst
Original file line number Diff line number Diff line change
Expand Up @@ -253,6 +253,20 @@ The .dist-info directory
installation will fail if any file in the archive is not both
mentioned and correctly hashed in RECORD.

Subdirectories in :file:`.dist-info/`
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

Subdirectories under :file:`.dist-info` are reserved for future use.
The following subdirectory names under :file:`.dist-info` are reserved for specific usage:

================= ==============
Subdirectory name PEP / Standard
================= ==============
``licenses`` :pep:`639`
``license_files`` :pep:`639`
``LICENSES`` `REUSE licensing framework <https://reuse.software>`__
``sboms`` :pep:`770`
================= ==============

The :file:`.dist-info/licenses/` directory
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
Expand All @@ -263,6 +277,12 @@ fields is specified, the :file:`.dist-info/` directory MUST contain a
``License-File`` fields in the :file:`METADATA` file at their respective paths
relative to the :file:`licenses/` directory.

The :file:`.dist-info/sboms/` directory
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

All files contained within the :file:`.dist-info/sboms` directory MUST
be Software Bill-of-Materials (SBOM) files that describe software contained
within the distribution archive.

The .data directory
^^^^^^^^^^^^^^^^^^^
Expand Down
12 changes: 11 additions & 1 deletion source/specifications/recording-installed-packages.rst
Original file line number Diff line number Diff line change
Expand Up @@ -66,10 +66,11 @@ The ``METADATA`` file is mandatory.
All other files may be omitted at the installing tool's discretion.
Additional installer-specific files may be present.

This :file:`.dist-info/` directory may contain the following directory, described in
This :file:`.dist-info/` directory may contain the following directories, described in
detail below:

* :file:`licenses/`: contains license files.
* :file:`sboms/`: contains Software Bill-of-Materials files (SBOMs).

.. note::

Expand Down Expand Up @@ -235,6 +236,15 @@ the :file:`METADATA` file at their respective paths relative to the
Any files in this directory MUST be copied from wheels by the install tools.


The :file:`sboms/` subdirectory
==================================

All files contained within the :file:`.dist-info/sboms` directory MUST
be Software Bill-of-Materials (SBOM) files that describe software contained
within the installed package.
Any files in this directory MUST be copied from wheels by the install tools.


Intentionally preventing changes to installed packages
======================================================

Expand Down