PEP 518: Clarify how tools should treat the absence of things
This commit is contained in:
parent
8b373d0bfd
commit
1542941b34
22
pep-0518.txt
22
pep-0518.txt
|
@ -173,21 +173,13 @@ community at the moment, build tools are expected to use the example
|
||||||
configuration file above as their default semantics when a
|
configuration file above as their default semantics when a
|
||||||
``pyproject.toml`` file is not present.
|
``pyproject.toml`` file is not present.
|
||||||
|
|
||||||
Tools should not require the existence of the ``[build-system]``
|
Tools should not require the existence of the ``[build-system]`` table.
|
||||||
table. A ``pyproject.toml`` file may be used to store configuration
|
A ``pyproject.toml`` file may be used to store configuration details
|
||||||
details other than build-related data and thus lack a
|
other than build-related data and thus lack a ``[build-system]`` table
|
||||||
``[build-system]`` table legitimately. It is up to the tool to decide
|
legitimately. If the file exists but is lacking the ``[build-system]``
|
||||||
how to handle this case. Potential options are:
|
table then the default values as specified above should be used.
|
||||||
|
If the table is specified but is missing required fields then the tool
|
||||||
1. Act as if the ``pyproject.toml`` file does not exist.
|
should consider it an error.
|
||||||
2. Assume the table exists with the default values specified above.
|
|
||||||
|
|
||||||
While subtle, there is a difference in these two options depending on
|
|
||||||
whether the existence of a ``pyproject.toml`` file has special
|
|
||||||
significance to the tool (e.g. pip currently triggers build isolation
|
|
||||||
for a project when a ``pyproject.toml`` file is found). If help is
|
|
||||||
desired in choosing an option for a tool then this PEP suggests the
|
|
||||||
second option to help people move over to ``pyproject.toml`` files.
|
|
||||||
|
|
||||||
|
|
||||||
tool table
|
tool table
|
||||||
|
|
Loading…
Reference in New Issue