diff options
| author | Takeshi KOMIYA <i.tkomiya@gmail.com> | 2022-01-01 20:19:27 +0900 |
|---|---|---|
| committer | Takeshi KOMIYA <i.tkomiya@gmail.com> | 2022-01-01 20:19:27 +0900 |
| commit | 0663602bb95e650975d95b5b87f5f26189b9b27c (patch) | |
| tree | 2dea7a5cd0f32141453502a2977c181414d2a7f5 | |
| parent | ce8039db1f67bd0176375ceae3a93413befec412 (diff) | |
| download | sphinx-git-0663602bb95e650975d95b5b87f5f26189b9b27c.tar.gz | |
Close #9595: Deprecate setuptools integration
| -rw-r--r-- | CHANGES | 3 | ||||
| -rw-r--r-- | doc/extdev/deprecated.rst | 5 | ||||
| -rw-r--r-- | doc/usage/advanced/setuptools.rst | 4 | ||||
| -rw-r--r-- | sphinx/setup_command.py | 5 |
4 files changed, 17 insertions, 0 deletions
@@ -22,6 +22,9 @@ Incompatible changes Deprecated ---------- +* setuptools integration. The ``build_sphinx`` sub-command for setup.py is + marked as deprecated to follow the policy of setuptools team. + Features added -------------- diff --git a/doc/extdev/deprecated.rst b/doc/extdev/deprecated.rst index ef675b9b3..159c6d8b6 100644 --- a/doc/extdev/deprecated.rst +++ b/doc/extdev/deprecated.rst @@ -22,6 +22,11 @@ The following is a list of deprecated interfaces. - (will be) Removed - Alternatives + * - :doc:`Setuptools integration </usage/advanced/setuptools>` + - 5.0 + - 7.0 + - N/A + * - ``sphinx.writers.latex.LaTeXWriter.docclasses`` - 5.0 - 7.0 diff --git a/doc/usage/advanced/setuptools.rst b/doc/usage/advanced/setuptools.rst index c6ef0fb41..672d65867 100644 --- a/doc/usage/advanced/setuptools.rst +++ b/doc/usage/advanced/setuptools.rst @@ -6,6 +6,10 @@ 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 v7.0. + Using setuptools integration ---------------------------- diff --git a/sphinx/setup_command.py b/sphinx/setup_command.py index ab5441394..de769e64d 100644 --- a/sphinx/setup_command.py +++ b/sphinx/setup_command.py @@ -13,6 +13,7 @@ import os import sys +import warnings from distutils.cmd import Command from distutils.errors import DistutilsExecError from io import StringIO @@ -20,6 +21,7 @@ from typing import Any, Dict from sphinx.application import Sphinx from sphinx.cmd.build import handle_exception +from sphinx.deprecation import RemovedInSphinx70Warning from sphinx.util.console import color_terminal, nocolor from sphinx.util.docutils import docutils_namespace, patch_docutils from sphinx.util.osutil import abspath @@ -140,6 +142,9 @@ class BuildDoc(Command): for builder in self.builder] def run(self) -> None: + warnings.warn('setup.py build_sphinx is deprecated.', + RemovedInSphinx70Warning, stacklevel=2) + if not color_terminal(): nocolor() if not self.verbose: # type: ignore |
