diff mbox series

doc: remove support for deprecated sphinx math extension

Message ID 976B64DA-E8B5-41AE-9413-518261A17258@siemens.com
State Accepted
Headers show
Series doc: remove support for deprecated sphinx math extension | expand

Commit Message

Storm, Christian May 23, 2024, 8:10 a.m. UTC
The pngmath module is removed since sphinx 1.8 (2018-09-13) in
favor of the imgmath module. Debian Buster ships sphinx 1.8.4

distutils is deprecated with removal planned for Python 3.12.

As all has been deprecated, remove this support case altogether.

Signed-off-by: Christian Storm <christian.storm@siemens.com>
---
 doc/source/conf.py | 8 ++------
 1 file changed, 2 insertions(+), 6 deletions(-)
diff mbox series

Patch

diff --git a/doc/source/conf.py b/doc/source/conf.py
index 5cfd7a09..0b71cbf9 100644
--- a/doc/source/conf.py
+++ b/doc/source/conf.py
@@ -15,7 +15,7 @@ 
 # All configuration values have a default; values that are commented out
 # serve to show the default.
 
-import sys, os, sphinx, distutils.version
+import sys, os, sphinx
 
 # If extensions (or modules to document with autodoc) are in another directory,
 # add these directories to sys.path here. If the directory is relative to the
@@ -29,12 +29,8 @@  import sys, os, sphinx, distutils.version
 
 # Add any Sphinx extension module names here, as strings. They can be extensions
 # coming with Sphinx (named 'sphinx.ext.*') or your custom ones.
-extensions = ['sphinx.ext.todo']
+extensions = ['sphinx.ext.todo', 'sphinx.ext.imgmath']
 
-if distutils.version.LooseVersion(sphinx.__version__) < distutils.version.LooseVersion('1.4'):
-    extensions.append('sphinx.ext.pngmath')
-else:
-    extensions.append('sphinx.ext.imgmath')
 
 # Add any paths that contain templates here, relative to this directory.
 templates_path = [u'_templates']