diff options
Diffstat (limited to 'doc/extdev/index.rst')
-rw-r--r-- | doc/extdev/index.rst | 20 |
1 files changed, 15 insertions, 5 deletions
diff --git a/doc/extdev/index.rst b/doc/extdev/index.rst index a82f33a80..481688acf 100644 --- a/doc/extdev/index.rst +++ b/doc/extdev/index.rst @@ -18,15 +18,25 @@ imports this module and executes its ``setup()`` function, which in turn notifies Sphinx of everything the extension offers -- see the extension tutorial for examples. -.. versionadded:: 1.3 - The ``setup()`` function can return a string, this is treated by Sphinx as - the version of the extension and used for informational purposes such as the - traceback file when an exception occurs. - The configuration file itself can be treated as an extension if it contains a ``setup()`` function. All other extensions to load must be listed in the :confval:`extensions` configuration value. +Extension metadata +------------------ + +.. versionadded:: 1.3 + +The ``setup()`` function can return a dictionary. This is treated by Sphinx +as metadata of the extension. Metadata keys currently recognized are: + +* ``'version'``: a string that identifies the extension version. It is used for + extension version requirement checking (see :confval:`needs_extensions`) and + informational purposes. If not given, ``"unknown version"`` is substituted. + +APIs used for writing extensions +-------------------------------- + .. toctree:: tutorial |