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
- .. _declaring-build-dependencies :
17
16
18
- ===================================
19
- Declaring build system dependencies
20
- ===================================
17
+ .. _pyproject-build-system-table :
18
+
19
+ Declaring build system dependencies: the ``[build-system] `` table
20
+ =================================================================
21
21
22
22
The ``pyproject.toml `` file is written in `TOML <https://toml.io >`_.
23
23
Among other metadata (such as :ref: `project metadata <declaring-project-metadata >`),
@@ -28,9 +28,6 @@ run the project's build system successfully.
28
28
29
29
Tables not defined by PyPA specifications are reserved for future use.
30
30
31
- build-system table
32
- ------------------
33
-
34
31
.. TODO: merge with PEP 517
35
32
36
33
The ``[build-system] `` table is used to store build-related data.
@@ -61,28 +58,6 @@ If the table is specified but is missing required fields then the tool
61
58
should consider it an error.
62
59
63
60
64
- .. TODO: move elsewhere
65
-
66
- .. _pyproject-tool-table :
67
-
68
- tool table
69
- ----------
70
-
71
- The ``[tool] `` table is where any tool related to your Python
72
- project, not just build tools, can have users specify configuration
73
- data as long as they use a sub-table within ``[tool] ``, e.g. the
74
- `flit <https://pypi.python.org/pypi/flit >`_ tool would store its
75
- configuration in ``[tool.flit] ``.
76
-
77
- A mechanism is needed to allocate names within the ``tool.* ``
78
- namespace, to make sure that different projects do not attempt to use
79
- the same sub-table and collide. Our rule is that a project can use
80
- the subtable ``tool.$NAME `` if, and only if, they own the entry for
81
- ``$NAME `` in the Cheeseshop/PyPI.
82
-
83
- JSON Schema
84
- -----------
85
-
86
61
To provide a type-specific representation of the resulting data from
87
62
the TOML file for illustrative purposes only, the following
88
63
`JSON Schema <https://json-schema.org >`_ would match the data format:
@@ -117,8 +92,11 @@ the TOML file for illustrative purposes only, the following
117
92
}
118
93
}
119
94
120
- Specification
121
- =============
95
+
96
+ .. _pyproject-project-table :
97
+
98
+ Declaring project metadata: the ``[project] `` table
99
+ ===================================================
122
100
123
101
There are two kinds of metadata: *static * and *dynamic *. Static
124
102
metadata is specified in the ``pyproject.toml `` file directly and
@@ -441,6 +419,25 @@ provided via tooling later on.
441
419
442
420
443
421
422
+ .. _pyproject-tool-table :
423
+
424
+ Arbitrary tool configuration: the ``[tool] `` table
425
+ ==================================================
426
+
427
+ The ``[tool] `` table is where any tool related to your Python
428
+ project, not just build tools, can have users specify configuration
429
+ data as long as they use a sub-table within ``[tool] ``, e.g. the
430
+ `flit <https://pypi.python.org/pypi/flit >`_ tool would store its
431
+ configuration in ``[tool.flit] ``.
432
+
433
+ A mechanism is needed to allocate names within the ``tool.* ``
434
+ namespace, to make sure that different projects do not attempt to use
435
+ the same sub-table and collide. Our rule is that a project can use
436
+ the subtable ``tool.$NAME `` if, and only if, they own the entry for
437
+ ``$NAME `` in the Cheeseshop/PyPI.
438
+
439
+
440
+
444
441
History
445
442
=======
446
443
0 commit comments