mirror of
https://github.com/sphinx-doc/sphinx.git
synced 2025-02-25 18:55:22 -06:00
Split `sphinx.application.builtin_extensions
` into groups
This is a preparatory step for when eventually the ``sphinxcontrib`` extensions are no longer loaded by default.
This commit is contained in:
parent
075986c508
commit
69066d0bb7
@ -51,7 +51,7 @@ if TYPE_CHECKING:
|
||||
from sphinx.builders import Builder
|
||||
|
||||
|
||||
builtin_extensions = (
|
||||
builtin_extensions: tuple[str, ...] = (
|
||||
'sphinx.addnodes',
|
||||
'sphinx.builders.changes',
|
||||
'sphinx.builders.epub3',
|
||||
@ -99,16 +99,21 @@ builtin_extensions = (
|
||||
'sphinx.environment.collectors.metadata',
|
||||
'sphinx.environment.collectors.title',
|
||||
'sphinx.environment.collectors.toctree',
|
||||
)
|
||||
_first_party_extensions = (
|
||||
# 1st party extensions
|
||||
'sphinxcontrib.applehelp',
|
||||
'sphinxcontrib.devhelp',
|
||||
'sphinxcontrib.htmlhelp',
|
||||
'sphinxcontrib.serializinghtml',
|
||||
'sphinxcontrib.qthelp',
|
||||
# Strictly, alabaster theme is not a builtin extension,
|
||||
# but it is loaded automatically to use it as default theme.
|
||||
)
|
||||
_first_party_themes = (
|
||||
# Alabaster is loaded automatically to be used as the default theme
|
||||
'alabaster',
|
||||
)
|
||||
builtin_extensions += _first_party_themes
|
||||
builtin_extensions += _first_party_extensions
|
||||
|
||||
ENV_PICKLE_FILENAME = 'environment.pickle'
|
||||
|
||||
@ -214,7 +219,8 @@ class Sphinx:
|
||||
__('This project needs at least Sphinx v%s and therefore cannot '
|
||||
'be built with this version.') % self.config.needs_sphinx)
|
||||
|
||||
# load all built-in extension modules
|
||||
# load all built-in extension modules, first-party extension modules,
|
||||
# and first-party themes
|
||||
for extension in builtin_extensions:
|
||||
self.setup_extension(extension)
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user