Skip to content

Commit 99fa924

Browse files
committed
Add back REQUESTED
1 parent 9b6d3a7 commit 99fa924

1 file changed

Lines changed: 24 additions & 0 deletions

File tree

source/specifications/recording-installed-packages.rst

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -47,6 +47,8 @@ below:
4747
* ``METADATA``: contains project metadata
4848
* ``RECORD``: records the list of installed files.
4949
* ``INSTALLER``: records the name of the tool used to install the project.
50+
* ``REQUESTED``: indicates that the project installation was explicitly
51+
requested (i.e., not installed as a dependency).
5052

5153
Only the ``METADATA`` file is mandatory.
5254
Additional installer-specific files may be present.
@@ -159,3 +161,25 @@ This value should be used for informational purposes only.
159161
For example, if a tool is asked to uninstall a project but finds no ``RECORD``
160162
file, it may suggest that the tool named in ``INSTALLER`` may be able to do the
161163
uninstallation.
164+
165+
166+
The REQUESTED file
167+
==================
168+
169+
Some install tools automatically detect unfulfilled dependencies and install
170+
them. In these cases, it is useful to track which distributions were installed
171+
purely as a dependency, so if their dependent distribution is later
172+
uninstalled, the user can be alerted of the orphaned dependency.
173+
174+
If a distribution is installed by direct user request (the usual case), a
175+
file named ``REQUESTED`` must be added to the ``.dist-info`` directory of the
176+
installed distribution.
177+
The ``REQUESTED`` file may be empty, or may contain a marker comment line
178+
beginning with the ``"#"`` character.
179+
180+
If an install tool installs a distribution automatically, as a dependency of
181+
another distribution, the ``REQUESTED`` file should not be created.
182+
183+
If a distribution that was already installed on the system as a dependency
184+
is later installed by name, tools should create the ``REQUESTED`` file in the
185+
``.dist-info`` directory of the existing installation.

0 commit comments

Comments
 (0)