Skip to content

Commit

Permalink
Merge pull request #1593 from hutcho/patch-1
Browse files Browse the repository at this point in the history
Clarified note on [build-system] and [project]
  • Loading branch information
chrysle authored Aug 23, 2024
2 parents 7e06fb2 + d93dca3 commit 5c54112
Showing 1 changed file with 10 additions and 10 deletions.
20 changes: 10 additions & 10 deletions source/guides/writing-pyproject-toml.rst
Original file line number Diff line number Diff line change
Expand Up @@ -22,19 +22,19 @@ three possible TOML tables in this file.

.. note::

There is a significant difference between the ``[build-system]`` and
``[project]`` tables. The former should always be present, regardless of
which build backend you use (since it *defines* the tool you use). The latter
is understood by *most* build backends, but some build backends use a
different format.
The ``[build-system]`` table should always be present,
regardless of which build backend you use (``[build-system]`` *defines* the
build tool you use).

At the time of writing this (November 2023), Poetry_ is a notable build
backend that does not use the ``[project]`` table (it uses the
``[tool.poetry]`` table instead).
On the other hand, the ``[project]`` table is understood by *most* build
backends, but some build backends use a different format.

As of August 2024, Poetry_ is a notable build backend that does not use
the ``[project]`` table, it uses the ``[tool.poetry]`` table instead.
Also, the setuptools_ build backend supports both the ``[project]`` table,
and the older format in ``setup.cfg`` or ``setup.py``. For new projects, it
is recommended to use the ``[project]`` table, and keep ``setup.py`` only if
and the older format in ``setup.cfg`` or ``setup.py``.

For new projects, use the ``[project]`` table, and keep ``setup.py`` only if
some programmatic configuration is needed (such as building C extensions),
but the ``setup.cfg`` and ``setup.py`` formats are still valid. See
:ref:`setup-py-deprecated`.
Expand Down

0 comments on commit 5c54112

Please sign in to comment.