1313The ``pyproject.toml `` file acts as a configuration file for packaging-related
1414tools (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
1925Declaring 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
3738build system. The strings in this list follow the :ref: `version specifier
3839specification <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
9899Declaring project metadata: the ``[project] `` table
99100===================================================
100101
102+ The ``[project] `` table specifies the project's :ref: `core metadata <core-metadata >`.
103+
101104There are two kinds of metadata: *static * and *dynamic *. Static
102105metadata is specified in the ``pyproject.toml `` file directly and
103106cannot 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
107110tool 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 >`.
115112The lack of a ``[project] `` table implicitly means the :term: `build backend <Build Backend> `
116113will dynamically provide all keys.
117114
0 commit comments