Debian Codegraph @

debian/patches/remove_contrib_references.diff

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