diff --git a/changelog/10721.doc.rst b/changelog/10721.doc.rst new file mode 100644 index 00000000000..345dc98d8e3 --- /dev/null +++ b/changelog/10721.doc.rst @@ -0,0 +1 @@ +Replaced ``setup.py`` usage with ``pyproject.toml`` in :ref:`writing-plugins`. diff --git a/doc/en/how-to/writing_plugins.rst b/doc/en/how-to/writing_plugins.rst index 56043a14f97..0e112a0ac88 100644 --- a/doc/en/how-to/writing_plugins.rst +++ b/doc/en/how-to/writing_plugins.rst @@ -212,11 +212,12 @@ as plugins. As an example consider the following package:: pytest_foo/plugin.py pytest_foo/helper.py -With the following typical ``setup.py`` extract: +With the following typical ``pyproject.toml`` extract: -.. code-block:: python +.. code-block:: toml - setup(..., entry_points={"pytest11": ["foo = pytest_foo.plugin"]}, ...) + [project.entry-points.pytest11] + foo = "pytest_foo.plugin" In this case only ``pytest_foo/plugin.py`` will be rewritten. If the helper module also contains assert statements which need to be