1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104
|
From: Dmitry Shachnev <mitya57@debian.org>
Date: Wed, 25 Dec 2019 23:18:56 +0300
Subject: Remove references to sphinxcontrib modules
To avoid dependency loops (these packages depend on sphinx themselves).
---
doc/usage/builders/index.rst | 24 ------------------------
sphinx/application.py | 13 +++++++++++--
2 files changed, 11 insertions(+), 26 deletions(-)
diff --git a/doc/usage/builders/index.rst b/doc/usage/builders/index.rst
index e293399..2625fe3 100644
--- a/doc/usage/builders/index.rst
+++ b/doc/usage/builders/index.rst
@@ -121,12 +121,6 @@ The most common builders are:
also generates HTML Help support files that allow the Microsoft HTML Help
Workshop to compile them into a CHM file.
- .. autoattribute:: name
-
- .. autoattribute:: format
-
- .. autoattribute:: supported_image_types
-
.. module:: sphinxcontrib.qthelp
.. class:: QtHelpBuilder
@@ -138,12 +132,6 @@ The most common builders are:
Moved to sphinxcontrib.qthelp from sphinx.builders package.
- .. autoattribute:: name
-
- .. autoattribute:: format
-
- .. autoattribute:: supported_image_types
-
.. _Qt help: https://doc.qt.io/qt-4.8/qthelp-framework.html
.. module:: sphinxcontrib.applehelp
@@ -164,12 +152,6 @@ The most common builders are:
output will not be valid until :program:`hiutil` has been run on all of the
``.lproj`` folders within the bundle.
- .. autoattribute:: name
-
- .. autoattribute:: format
-
- .. autoattribute:: supported_image_types
-
.. versionadded:: 1.3
.. versionchanged:: 2.0
@@ -183,12 +165,6 @@ The most common builders are:
also generates `GNOME Devhelp <https://wiki.gnome.org/Apps/Devhelp>`__
support file that allows the GNOME Devhelp reader to view them.
- .. autoattribute:: name
-
- .. autoattribute:: format
-
- .. autoattribute:: supported_image_types
-
.. versionchanged:: 2.0
Moved to sphinxcontrib.devhelp from sphinx.builders package.
diff --git a/sphinx/application.py b/sphinx/application.py
index fe0e8bd..154bfd2 100644
--- a/sphinx/application.py
+++ b/sphinx/application.py
@@ -19,7 +19,12 @@ from sphinx import locale, package_dir
from sphinx._cli.util.colour import bold
from sphinx.config import Config
from sphinx.environment import BuildEnvironment
-from sphinx.errors import ApplicationError, ConfigError, VersionRequirementError
+from sphinx.errors import (
+ ApplicationError,
+ ConfigError,
+ ExtensionError,
+ VersionRequirementError,
+)
from sphinx.events import EventManager
from sphinx.highlighting import lexer_classes
from sphinx.locale import __
@@ -131,7 +136,6 @@ _first_party_themes = (
'alabaster',
)
builtin_extensions += _first_party_themes
-builtin_extensions += _first_party_extensions
ENV_PICKLE_FILENAME = 'environment.pickle'
@@ -285,6 +289,11 @@ class Sphinx:
# and first-party themes
for extension in builtin_extensions:
self.setup_extension(extension)
+ for extension in _first_party_extensions:
+ try:
+ self.setup_extension(extension)
+ except ExtensionError:
+ pass # DEBIAN: Allow missing first-party extensions
# load all user-given extension modules
for extension in self.config.extensions:
|