docs: plugins - show setup.cfg example

This commit is contained in:
James R. Barlow 2021-06-14 02:15:52 -07:00
parent 7965b1f930
commit 5d08303805

View File

@ -61,9 +61,10 @@ similar to ``pytest`` packages such as ``pytest-cov`` (the package) and
.. note::
We strongly recommend plugin authors name their plugins with the prefix
We recommend plugin authors name their plugins with the prefix
``ocrmypdf-`` (for the package name on PyPI) and ``ocrmypdf_`` (for the
module), just like pytest plugins.
module), just like pytest plugins. At the same time, please make it clear
that your package is not official.
Setuptools plugins
==================
@ -86,6 +87,13 @@ named ``ocrmypdf-exampleplugin``:
entry_points={"ocrmypdf": ["exampleplugin = exampleplugin.pluginmodule"]},
)
.. code-block:: ini
# equivalent setup.cfg
[options.entry_points]
ocrmypdf =
exampleplugin = exampleplugin.pluginmodule
Plugin requirements
===================