From afff64f0ad389772691864aa04403c2c84a35789 Mon Sep 17 00:00:00 2001 From: Kunal Shah <112575110+kunalkshah1@users.noreply.github.com> Date: Fri, 20 Nov 2026 11:47:50 +0530 Subject: [PATCH] Introduce wheel layout before the installation example --- .../binary-distribution-format.rst | 16 ++++++++++++++-- 1 file changed, 14 insertions(+), 2 deletions(-) diff --git a/source/specifications/binary-distribution-format.rst b/source/specifications/binary-distribution-format.rst index b2814f50c..4702696c0 100644 --- a/source/specifications/binary-distribution-format.rst +++ b/source/specifications/binary-distribution-format.rst @@ -21,6 +21,20 @@ out onto their final paths at any later time. Details ======= +The example below uses ``distribution-1.0`` as the distribution name and +version in the archive's directory names. The ``distribution-1.0.dist-info/`` +directory contains metadata, including the ``WHEEL`` file that describes the +archive. The optional ``distribution-1.0.data/`` directory groups files that +need a different destination from the archive root, such as scripts, into +subdirectories named for their destinations. + +An installation scheme maps keys to directories in the target Python +environment. Two :ref:`installation path keys ` +are ``purelib`` for platform-independent package files and ``platlib`` for +platform-specific package files. These keys can point to the same directory, +usually ``site-packages``. The ``Root-Is-Purelib`` field in ``WHEEL`` tells +the installer which key to use for the archive root. + Installing a wheel 'distribution-1.0-py32-none-any.whl' ------------------------------------------------------- @@ -43,8 +57,6 @@ Wheel installation notionally consists of two phases: destination path. Each subdirectory of ``distribution-1.0.data/`` is a key into a dict of destination directories, such as ``distribution-1.0.data/(purelib|platlib|headers|scripts|data)``. - These subdirectories are :ref:`installation paths defined by sysconfig - `. c. If applicable, update scripts starting with ``#!python`` to point to the correct interpreter. d. Update ``distribution-1.0.dist-info/RECORD`` with the installed