Skip to content

Commit

Permalink
Address review comments
Browse files Browse the repository at this point in the history
  • Loading branch information
sethmlarson committed Feb 26, 2025
1 parent 037d2fb commit f0258e8
Showing 1 changed file with 46 additions and 41 deletions.
87 changes: 46 additions & 41 deletions peps/pep-0770.rst
Original file line number Diff line number Diff line change
Expand Up @@ -204,11 +204,11 @@ Specification

The changes necessary to implement this PEP include:

* A new reserved registry of subdirectory names in the ``.dist-info`` directory.
* A new reserved optional ``[additional-files]`` table with an optional
``sboms`` key added to
* Explicitly reserving all subdirectory names in the ``.dist-info`` directory.
* A new registry of reserved subdirectory names in the ``.dist-info`` directory.
* An optional top-level table, ``[additional-files]``, added to
`project source metadata <770-spec-project-source-metadata_>`_,
as defined in the `pyproject.toml specification <pyprojecttoml_>`__.
* An optional ``sboms`` key in the new ``[additional-files]`` table,
* `Additions <770-spec-project-formats_>`_ to the built distribution (wheel),
and installed project specifications

Expand All @@ -218,30 +218,37 @@ generate complete SBOM documents for Python packages.

.. _770-spec-dist-info-subdirs:

Reserved ``.dist-info`` subdirectories registry
-----------------------------------------------
Reserving all subdirectory names in ``.dist-info``
--------------------------------------------------

This PEP explicitly reserves all subdirectory names in the ``.dist-info``
directory for future usage.

Build backends MUST NOT create subdirectories in the ``.dist-info`` directory
beyond the names in the `registry <770-spec-dist-info-subdirs-registry>`_
to avoid collisions with future reserved names.

Build frontends and publishing tools MAY warn users if any ``.dist-info``
subdirectories aren't in the registry.

.. _770-spec-dist-info-subdirs-registry:

Registry of reserved ``.dist-info`` subdirectory names
------------------------------------------------------

This PEP introduces a new registry of reserved subdirectory names allowed in
the ``.dist-info`` directory for the :term:`distribution archive`
and :term:`installed project` s project types. Future additions to this registry
will be made through the PEP process. The initial values in this registry are:

.. table::

================= ==========
Directory name PEP
================= ==========
``licenses`` :pep:`639`
``license_files`` N/A (See :ref:`770-backwards-compat`)
``LICENSES`` N/A (See :ref:`770-backwards-compat`)
``sboms`` :pep:`770`
================= ==========

Build backends MUST NOT create subdirectories in the ``.dist-info`` directory
beyond the names in the registry to avoid collisions with future reserved names.

Build frontends and publishing tools MAY warn users or raise a validation error
if any ``.dist-info`` subdirectories aren't in the registry.
================= ==========
Subdirectory name PEP
================= ==========
``licenses`` :pep:`639`
``license_files`` N/A (See :ref:`770-backwards-compat`)
``LICENSES`` N/A (See :ref:`770-backwards-compat`)
``sboms`` :pep:`770`
================= ==========

.. _770-spec-project-source-metadata:

Expand Down Expand Up @@ -411,25 +418,23 @@ Note that this only includes records for
being pervasively used and somehow load-bearing is unlikely, so is an accepted
risk of using this method. This query yielded the following results:

.. table::

====================== ===============
Subdirectory Unique Projects
====================== ===============
``licenses`` 22,026
``license_files`` 1,828
``LICENSES`` 170
``.ipynb_checkpoints`` 85
``license`` 18
``.wex`` 9
``dist`` 8
``include`` 6
``build`` 5
``tmp`` 4
``src`` 3
``calmjs_artifacts`` 3
``.idea`` 2
====================== ===============
====================== ===============
Subdirectory Unique Projects
====================== ===============
``licenses`` 22,026
``license_files`` 1,828
``LICENSES`` 170
``.ipynb_checkpoints`` 85
``license`` 18
``.wex`` 9
``dist`` 8
``include`` 6
``build`` 5
``tmp`` 4
``src`` 3
``calmjs_artifacts`` 3
``.idea`` 2
====================== ===============

Not shown above are around ~50 other subdirectory names that are used in a
single project. From these results we can see:
Expand Down

0 comments on commit f0258e8

Please sign in to comment.