Skip to content

Commit d1a760a

Browse files
committed
pyproject.toml spec: Further harmonize
1 parent 441d38e commit d1a760a

File tree

1 file changed

+12
-15
lines changed

1 file changed

+12
-15
lines changed

source/specifications/pyproject-toml.rst

Lines changed: 12 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -13,20 +13,21 @@
1313
The ``pyproject.toml`` file acts as a configuration file for packaging-related
1414
tools (as well as other tools).
1515

16+
The ``pyproject.toml`` file is written in `TOML <https://toml.io>`_. Three
17+
tables are currently specified, namely
18+
:ref:`[build-system] <pyproject-build-system-table>`,
19+
:ref:`[project] <pyproject-project-table>` and
20+
:ref:`[tool] <pyproject-tool-table>`. Other tables are reserved for future
21+
use (tool-specific configuration should use the ``[tool]`` table).
1622

1723
.. _pyproject-build-system-table:
1824

1925
Declaring build system dependencies: the ``[build-system]`` table
2026
=================================================================
2127

22-
The ``pyproject.toml`` file is written in `TOML <https://toml.io>`_.
23-
Among other metadata (such as :ref:`project metadata <declaring-project-metadata>`),
24-
it declares any Python level dependencies that must be installed in order to
25-
run the project's build system successfully.
26-
27-
.. TODO: move this sentence elsewhere
28-
29-
Tables not defined by PyPA specifications are reserved for future use.
28+
The ``[build-system]`` table declares any Python level dependencies that
29+
must be installed in order to run the project's build system
30+
successfully.
3031

3132
.. TODO: merge with PEP 517
3233
@@ -37,7 +38,7 @@ of strings representing dependencies required to execute the
3738
build system. The strings in this list follow the :ref:`version specifier
3839
specification <version-specifiers>`.
3940

40-
An example ``build-system`` table for a project built with
41+
An example ``[build-system]`` table for a project built with
4142
``setuptools`` is:
4243

4344
.. code-block:: toml
@@ -98,6 +99,8 @@ the TOML file for illustrative purposes only, the following
9899
Declaring project metadata: the ``[project]`` table
99100
===================================================
100101

102+
The ``[project]`` table specifies the project's :ref:`core metadata <core-metadata>`.
103+
101104
There are two kinds of metadata: *static* and *dynamic*. Static
102105
metadata is specified in the ``pyproject.toml`` file directly and
103106
cannot be specified or changed by a tool (this includes data
@@ -106,12 +109,6 @@ by the metadata). Dynamic metadata is listed via the ``dynamic`` key
106109
(defined later in this specification) and represents metadata that a
107110
tool will later provide.
108111

109-
The keys defined in this specification MUST be in a table named
110-
``[project]`` in ``pyproject.toml``. No tools may add keys to this
111-
table which are not defined by this specification. For tools wishing
112-
to store their own settings in ``pyproject.toml``, they may use the
113-
``[tool]`` table as defined in the
114-
:ref:`build dependency declaration specification <declaring-build-dependencies>`.
115112
The lack of a ``[project]`` table implicitly means the :term:`build backend <Build Backend>`
116113
will dynamically provide all keys.
117114

0 commit comments

Comments
 (0)