13
13
The ``pyproject.toml `` file acts as a configuration file for packaging-related
14
14
tools (as well as other tools).
15
15
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).
16
22
17
23
.. _pyproject-build-system-table :
18
24
19
25
Declaring build system dependencies: the ``[build-system] `` table
20
26
=================================================================
21
27
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.
30
31
31
32
.. TODO: merge with PEP 517
32
33
@@ -37,7 +38,7 @@ of strings representing dependencies required to execute the
37
38
build system. The strings in this list follow the :ref: `version specifier
38
39
specification <version-specifiers>`.
39
40
40
- An example ``build-system `` table for a project built with
41
+ An example ``[ build-system] `` table for a project built with
41
42
``setuptools `` is:
42
43
43
44
.. code-block :: toml
@@ -98,6 +99,8 @@ the TOML file for illustrative purposes only, the following
98
99
Declaring project metadata: the ``[project] `` table
99
100
===================================================
100
101
102
+ The ``[project] `` table specifies the project's :ref: `core metadata <core-metadata >`.
103
+
101
104
There are two kinds of metadata: *static * and *dynamic *. Static
102
105
metadata is specified in the ``pyproject.toml `` file directly and
103
106
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
106
109
(defined later in this specification) and represents metadata that a
107
110
tool will later provide.
108
111
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 >`.
115
112
The lack of a ``[project] `` table implicitly means the :term: `build backend <Build Backend> `
116
113
will dynamically provide all keys.
117
114
0 commit comments