File tree Expand file tree Collapse file tree 1 file changed +8
-12
lines changed Expand file tree Collapse file tree 1 file changed +8
-12
lines changed Original file line number Diff line number Diff line change @@ -120,24 +120,20 @@ a list of packages to :func:`setup`'s ``packages`` argument instead of using
120120Using package metadata
121121======================
122122
123- :doc: `Setuptools <setuptools:index >` provides :doc: `special support
124- <setuptools:userguide/entry_point>` for plugins. By providing the
125- ``entry_points `` argument to :func: `setup ` in :file: `setup.py ` plugins can
126- register themselves for discovery.
123+ Packages can have metadata for plugins described in the :ref: `entry-points `.
124+ By specifying them, a package announces that it contains a specific kind of plugin.
125+ Another package supporting this kind of plugin can use the metadata to discover that plugin.
127126
128127For example if you have a package named ``myapp-plugin-a `` and it includes
129- in its :file: ` setup.py `:
128+ the following in its `` pyproject.toml ` `:
130129
131- .. code-block :: python
130+ .. code-block :: toml
132131
133- setup(
134- ...
135- entry_points = {' myapp.plugins' : ' a = myapp_plugin_a' },
136- ...
137- )
132+ [project.entry-points.'myapp.plugins']
133+ a = 'myapp_plugin_a'
138134
139135 Then you can discover and load all of the registered entry points by using
140- :func: `importlib.metadata.entry_points ` (or the ` backport `_
136+ :func: `importlib.metadata.entry_points ` (or the backport _
141137``importlib_metadata >= 3.6 `` for Python 3.6-3.9):
142138
143139.. code-block :: python
You can’t perform that action at this time.
0 commit comments