Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Docs] Quickstart - add pyproject.toml info to the declarative config section #4204

Merged
merged 11 commits into from
Feb 5, 2024
24 changes: 17 additions & 7 deletions docs/userguide/quickstart.rst
Original file line number Diff line number Diff line change
Expand Up @@ -442,14 +442,24 @@ distribution so others can use it. This functionality is provided by
<PyPUG:tutorials/packaging-projects>`.


Transitioning from ``setup.py`` to ``setup.cfg``
------------------------------------------------
Transitioning from ``setup.py`` to declarative config
-----------------------------------------------------
To avoid executing arbitrary scripts and boilerplate code, we are transitioning
into a full-fledged ``setup.cfg`` to declare your package information instead
of running ``setup()``. This inevitably brings challenges due to a different
syntax. :doc:`Here </userguide/declarative_config>` we provide a quick guide to
understanding how ``setup.cfg`` is parsed by ``setuptools`` to ease the pain of
transition.
from defining all your package information by running ``setup()`` to doing this
declaratively - using ``pyproject.toml`` (or older ``setup.cfg``).

To ease the challenges of transitioning, we provide a quick
:doc:`guide </userguide/pyproject_config>` to understanding how ``pyproject.toml``
is parsed by ``setuptools``. (Alternatively, :doc:`here </userguide/declarative_config>`
is the guide for ``setup.cfg``).

.. note::

The approach ``setuptools`` would like to take is to eventually use a single
declarative format (``pyproject.toml``) instead of maintaining 2
(``pyproject.toml`` / ``setup.cfg``). Chances are, ``setup.cfg`` will
continue to be maintained for a long time. Currently, ``pyproject.toml`` may
still have some `limitations <https://github.com/pypa/setuptools/issues/3683>`_.
VladimirFokow marked this conversation as resolved.
Show resolved Hide resolved

.. _packaging-resources:

Expand Down
1 change: 1 addition & 0 deletions newsfragments/4200.doc.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Updated "Quickstart" to describe the current status of ``setup.cfg`` and ``pyproject.toml`` -- by :user:`VladimirFokow`