From 7804c4af6e0763ac55b5a25fde871b973dd256f1 Mon Sep 17 00:00:00 2001 From: Danny Guan Date: Wed, 18 Dec 2024 15:33:05 -0500 Subject: [PATCH] Update core.py - Make myst_parser optional extension, only install myst_parser if there are not any similar extensions in the config: myst_nb, myst_parser, etc. --- src/rocm_docs/core.py | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/rocm_docs/core.py b/src/rocm_docs/core.py index 233cb2e7..afb7509c 100644 --- a/src/rocm_docs/core.py +++ b/src/rocm_docs/core.py @@ -115,7 +115,6 @@ def _force_notfound_prefix(app: Sphinx, _: Config) -> None: def setup(app: Sphinx) -> dict[str, Any]: """Set up rocm_docs.core as a Sphinx extension.""" required_extensions = [ - "myst_parser", "notfound.extension", "rocm_docs.projects", "sphinx_copybutton", @@ -125,6 +124,11 @@ def setup(app: Sphinx) -> dict[str, Any]: "sphinx.ext.doctest", "sphinx.ext.duration", ] + + optional_extensions = [ + "myst_parser" + ] + for ext in required_extensions: app.setup_extension(ext)