Skip to content

Commit 336610c

Browse files
committed
1 parent 99fa924 commit 336610c

1 file changed

Lines changed: 13 additions & 2 deletions

File tree

source/specifications/recording-installed-packages.rst

Lines changed: 13 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,10 @@ below:
5050
* ``REQUESTED``: indicates that the project installation was explicitly
5151
requested (i.e., not installed as a dependency).
5252

53-
Only the ``METADATA`` file is mandatory.
53+
The ``METADATA`` file is mandatory.
54+
The ``REQUESTED`` file must be written when applicable
55+
(see the corresponding section).
56+
All other files may be omitted at the installing tool's discretion.
5457
Additional installer-specific files may be present.
5558

5659
.. note::
@@ -103,7 +106,7 @@ as a base 10 integer.
103106
For any file, either or both of the *hash* and *size* fields may be left empty.
104107
Commonly, entries for ``.pyc`` files and the ``RECORD`` file itself have empty
105108
*hash* and *size*.
106-
For other files, leaving the information out is not recommended, as it
109+
For other files, leaving the information out is discouraged, as it
107110
prevents verifying the integrity of the installed project.
108111

109112
If the ``RECORD`` file is present, it must list all installed files of the
@@ -137,6 +140,11 @@ Here is an example snippet of a possible ``RECORD`` file::
137140
blib2to3/pygram.py,sha256=mXpQPqHcamFwch0RkyJsb92Wd0kUP3TW7d-u9dWhCGY,2085
138141
blib2to3/pytree.py,sha256=RWj3IL4U-Ljhkn4laN0C3p7IRdfvT3aIRjTV-x9hK1c,28530
139142

143+
If the ``RECORD`` file is missing, tools that rely on ``.dist-info`` must not
144+
atempt to uninstall or upgrade the package.
145+
(This does not apply to tools that rely on other sources of information,
146+
such as system package managers in Linux distros.)
147+
140148

141149
The INSTALLER file
142150
==================
@@ -180,6 +188,9 @@ beginning with the ``"#"`` character.
180188
If an install tool installs a distribution automatically, as a dependency of
181189
another distribution, the ``REQUESTED`` file should not be created.
182190

191+
If an install tool cannot determine whether installation was requested
192+
by the user, it must default to creating the ``REQUESTED`` file.
193+
183194
If a distribution that was already installed on the system as a dependency
184195
is later installed by name, tools should create the ``REQUESTED`` file in the
185196
``.dist-info`` directory of the existing installation.

0 commit comments

Comments
 (0)