Tweak PEP 426 install hooks
This commit is contained in:
parent
682a7fe994
commit
5516e1cb73
30
pep-0426.txt
30
pep-0426.txt
|
@ -778,9 +778,6 @@ The following supporting documents can be named:
|
||||||
* ``license``: a file with the full text of the distribution's license
|
* ``license``: a file with the full text of the distribution's license
|
||||||
* ``changelog``: a file describing changes made to the distribution
|
* ``changelog``: a file describing changes made to the distribution
|
||||||
|
|
||||||
If this field is provided at all, it MUST name at least one included
|
|
||||||
document.
|
|
||||||
|
|
||||||
Supporting documents MUST be included directly in the ``dist-info``
|
Supporting documents MUST be included directly in the ``dist-info``
|
||||||
directory. Directory separators are NOT permitted in document names.
|
directory. Directory separators are NOT permitted in document names.
|
||||||
|
|
||||||
|
@ -1566,6 +1563,13 @@ installation tools MUST NOT invoke the install hooks - it is assumed
|
||||||
that the ``setup.py`` script will already invoke any necessary
|
that the ``setup.py`` script will already invoke any necessary
|
||||||
post-installation behaviour.
|
post-installation behaviour.
|
||||||
|
|
||||||
|
Installation tools SHOULD treat an exception thrown by a postinstall hook
|
||||||
|
as a failure of the installation and revert any other changes made to the
|
||||||
|
system.
|
||||||
|
|
||||||
|
Installation tools SHOULD treat an exception thrown by a preuninstall hook
|
||||||
|
as an indication the removal of the distribution should be aborted.
|
||||||
|
|
||||||
Installation tools MUST NOT silently ignore install hooks, as failing
|
Installation tools MUST NOT silently ignore install hooks, as failing
|
||||||
to call these hooks may result in a misconfigured installation that fails
|
to call these hooks may result in a misconfigured installation that fails
|
||||||
unexpectedly at runtime. Installation tools MAY refuse to install
|
unexpectedly at runtime. Installation tools MAY refuse to install
|
||||||
|
@ -2225,6 +2229,26 @@ from wheels, so it is a good candidate for postponing to metadata 2.1
|
||||||
(at the earliest).
|
(at the earliest).
|
||||||
|
|
||||||
|
|
||||||
|
Additional install hooks
|
||||||
|
------------------------
|
||||||
|
|
||||||
|
In addition to the postinstall and preuninstall hooks described in the PEP,
|
||||||
|
other distribution systems (like RPM) include the notion of preinstall
|
||||||
|
and postuninstall hooks. These hooks would run with the runtime dependencies
|
||||||
|
installed, but without the distribution itself. These have been deliberately
|
||||||
|
omitted, as they're well suited to being explored further as metadata
|
||||||
|
extensions.
|
||||||
|
|
||||||
|
Similarly, the idea of "optional" postinstall and preuninstall hooks can
|
||||||
|
be pursued as a metadata extension.
|
||||||
|
|
||||||
|
By contrast, the mandatory postinstall and preuninstall hooks have been
|
||||||
|
included directly in the PEP, specifically to ensure installation tools
|
||||||
|
don't silently ignore them. This ensures users will either be able to
|
||||||
|
install such distributions, or else receive an explicit error at installation
|
||||||
|
time.
|
||||||
|
|
||||||
|
|
||||||
Metabuild system
|
Metabuild system
|
||||||
----------------
|
----------------
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue