diff options
author | Adam Turner <9087854+AA-Turner@users.noreply.github.com> | 2023-04-27 01:22:04 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-04-27 01:22:04 +0100 |
commit | 2a9e805206be7859dea0d222ca9b20a8875d3726 (patch) | |
tree | e229d41e29be26bd3016547cd4a24fd35fc6255d /doc | |
parent | 616ba29f28bd04d7f407a247398b3dbba1da204a (diff) | |
download | sphinx-git-2a9e805206be7859dea0d222ca9b20a8875d3726.tar.gz |
Remove the deprecated Setuptools integration (#11363)
Diffstat (limited to 'doc')
-rw-r--r-- | doc/conf.py | 3 | ||||
-rw-r--r-- | doc/extdev/deprecated.rst | 2 | ||||
-rw-r--r-- | doc/usage/advanced/setuptools.rst | 200 | ||||
-rw-r--r-- | doc/usage/index.rst | 1 | ||||
-rw-r--r-- | doc/usage/quickstart.rst | 1 |
5 files changed, 1 insertions, 206 deletions
diff --git a/doc/conf.py b/doc/conf.py index 19b8b2a2e..8bf8d90a7 100644 --- a/doc/conf.py +++ b/doc/conf.py @@ -231,9 +231,6 @@ def setup(app): app.add_object_type('confval', 'confval', objname='configuration value', indextemplate='pair: %s; configuration value') - app.add_object_type('setuptools-confval', 'setuptools-confval', - objname='setuptools configuration value', - indextemplate='pair: %s; setuptools configuration value') fdesc = GroupedField('parameter', label='Parameters', names=['param'], can_collapse=True) app.add_object_type('event', 'event', 'pair: %s; event', parse_event, diff --git a/doc/extdev/deprecated.rst b/doc/extdev/deprecated.rst index 8029714df..863af3165 100644 --- a/doc/extdev/deprecated.rst +++ b/doc/extdev/deprecated.rst @@ -102,7 +102,7 @@ The following is a list of deprecated interfaces. - 7.0 - The standard library ``json`` module. - * - :doc:`Setuptools integration </usage/advanced/setuptools>` + * - The Setuptools integration (``setup.py build_sphinx``) - 5.0 - 7.0 - N/A diff --git a/doc/usage/advanced/setuptools.rst b/doc/usage/advanced/setuptools.rst deleted file mode 100644 index 6fe68dcdd..000000000 --- a/doc/usage/advanced/setuptools.rst +++ /dev/null @@ -1,200 +0,0 @@ -.. _setuptools: - -Setuptools integration -====================== - -Sphinx supports integration with setuptools and distutils through a custom -command - :class:`!sphinx.setup_command.BuildDoc`. - -.. deprecated:: 5.0 - - This feature will be removed in Sphinx 7.0. - -Using setuptools integration ----------------------------- - -The Sphinx build can then be triggered from distutils, and some Sphinx -options can be set in ``setup.py`` or ``setup.cfg`` instead of Sphinx's own -configuration file. - -For instance, from ``setup.py``:: - - # this is only necessary when not using setuptools/distribute - from sphinx.setup_command import BuildDoc - cmdclass = {'build_sphinx': BuildDoc} - - name = 'My project' - version = '1.2' - release = '1.2.0' - setup( - name=name, - author='Bernard Montgomery', - version=release, - cmdclass=cmdclass, - # these are optional and override conf.py settings - command_options={ - 'build_sphinx': { - 'project': ('setup.py', name), - 'version': ('setup.py', version), - 'release': ('setup.py', release), - 'source_dir': ('setup.py', 'doc')}}, - ) - -.. note:: - - If you set Sphinx options directly in the ``setup()`` command, replace - hyphens in variable names with underscores. In the example above, - ``source-dir`` becomes ``source_dir``. - -Or add this section in ``setup.cfg``:: - - [build_sphinx] - project = 'My project' - version = 1.2 - release = 1.2.0 - source-dir = 'doc' - -Once configured, call this by calling the relevant command on ``setup.py``:: - - $ python setup.py build_sphinx - -Options for setuptools integration ----------------------------------- - -.. setuptools-confval:: fresh-env - - A boolean that determines whether the saved environment should be discarded - on build. Default is false. - - This can also be set by passing the `-E` flag to ``setup.py``: - - .. code-block:: console - - $ python setup.py build_sphinx -E - -.. setuptools-confval:: all-files - - A boolean that determines whether all files should be built from scratch. - Default is false. - - This can also be set by passing the `-a` flag to ``setup.py``: - - .. code-block:: console - - $ python setup.py build_sphinx -a - -.. setuptools-confval:: source-dir - - The target source directory. This can be relative to the ``setup.py`` or - ``setup.cfg`` file, or it can be absolute. It defaults to ``./doc`` or - ``./docs`` if either contains a file named ``conf.py`` (checking ``./doc`` - first); otherwise it defaults to the current directory. - - This can also be set by passing the `-s` flag to ``setup.py``: - - .. code-block:: console - - $ python setup.py build_sphinx -s $SOURCE_DIR - -.. setuptools-confval:: build-dir - - The target build directory. This can be relative to the ``setup.py`` or - ``setup.cfg`` file, or it can be absolute. Default is ``./build/sphinx``. - -.. setuptools-confval:: config-dir - - Location of the configuration directory. This can be relative to the - ``setup.py`` or ``setup.cfg`` file, or it can be absolute. Default is to use - `source-dir`. - - This can also be set by passing the `-c` flag to ``setup.py``: - - .. code-block:: console - - $ python setup.py build_sphinx -c $CONFIG_DIR - - .. versionadded:: 1.0 - -.. setuptools-confval:: builder - - The builder or list of builders to use. Default is ``html``. - - This can also be set by passing the `-b` flag to ``setup.py``: - - .. code-block:: console - - $ python setup.py build_sphinx -b $BUILDER - - .. versionchanged:: 1.6 - This can now be a comma- or space-separated list of builders - -.. setuptools-confval:: warning-is-error - - A boolean that ensures Sphinx warnings will result in a failed build. - Default is false. - - This can also be set by passing the `-W` flag to ``setup.py``: - - .. code-block:: console - - $ python setup.py build_sphinx -W - - .. versionadded:: 1.5 - -.. setuptools-confval:: project - - The documented project's name. Default is ``''``. - - .. versionadded:: 1.0 - -.. setuptools-confval:: version - - The short X.Y version. Default is ``''``. - - .. versionadded:: 1.0 - -.. setuptools-confval:: release - - The full version, including alpha/beta/rc tags. Default is ``''``. - - .. versionadded:: 1.0 - -.. setuptools-confval:: today - - How to format the current date, used as the replacement for ``|today|``. - Default is ``''``. - - .. versionadded:: 1.0 - -.. setuptools-confval:: link-index - - A boolean that ensures index.html will be linked to the root doc. Default - is false. - - This can also be set by passing the `-i` flag to ``setup.py``: - - .. code-block:: console - - $ python setup.py build_sphinx -i - - .. versionadded:: 1.0 - -.. setuptools-confval:: copyright - - The copyright string. Default is ``''``. - - .. versionadded:: 1.3 - -.. setuptools-confval:: nitpicky - - Run in nit-picky mode. Currently, this generates warnings for all missing - references. See the config value :confval:`nitpick_ignore` for a way to - exclude some references as "known missing". - - .. versionadded:: 1.8 - -.. setuptools-confval:: pdb - - A boolean to configure ``pdb`` on exception. Default is false. - - .. versionadded:: 1.5 diff --git a/doc/usage/index.rst b/doc/usage/index.rst index 0f4c22211..fd8cdd8bf 100644 --- a/doc/usage/index.rst +++ b/doc/usage/index.rst @@ -17,5 +17,4 @@ looking for guidance on extending Sphinx, refer to :doc:`/development/index`. extensions/index theming advanced/intl - advanced/setuptools advanced/websupport/index diff --git a/doc/usage/quickstart.rst b/doc/usage/quickstart.rst index abfa269d8..0773f6030 100644 --- a/doc/usage/quickstart.rst +++ b/doc/usage/quickstart.rst @@ -332,7 +332,6 @@ More topics to be covered - :doc:`Other extensions </usage/extensions/index>`: - Static files - :doc:`Selecting a theme </usage/theming>` -- :doc:`/usage/advanced/setuptools` - :ref:`Templating <templating>` - Using extensions - :ref:`Writing extensions <dev-extensions>` |