From: Jean-Philippe ARGAUD Date: Mon, 18 Mar 2019 14:33:31 +0000 (+0100) Subject: Compatibility fix for sphinx documentation X-Git-Tag: V9_3_0rc2~21 X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=80a078a505224fec4f7f913d9479cb78e79d2992;p=modules%2Fadao.git Compatibility fix for sphinx documentation --- diff --git a/doc/en/conf.py b/doc/en/conf.py index d1c9d94..b1d0cb0 100644 --- a/doc/en/conf.py +++ b/doc/en/conf.py @@ -34,7 +34,7 @@ # All configuration values have a default; values that are commented out # serve to show the default. -import sys, os +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 @@ -57,8 +57,12 @@ except: # 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.imgmath"] -# extensions = ["sphinx.ext.pngmath"] +from distutils.version import LooseVersion #, StrictVersion +if LooseVersion(sphinx.__version__) < LooseVersion("1.4.0"): + extensions = ["sphinx.ext.pngmath"] +else: + extensions = ["sphinx.ext.imgmath"] +# # Add any paths that contain templates here, relative to this directory. templates_path = ['_templates'] diff --git a/doc/fr/conf.py b/doc/fr/conf.py index 2f76da9..7fa242a 100644 --- a/doc/fr/conf.py +++ b/doc/fr/conf.py @@ -34,7 +34,7 @@ # All configuration values have a default; values that are commented out # serve to show the default. -import sys, os +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 @@ -57,8 +57,12 @@ except: # 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.imgmath"] -# extensions = ["sphinx.ext.pngmath"] +from distutils.version import LooseVersion #, StrictVersion +if LooseVersion(sphinx.__version__) < LooseVersion("1.4.0"): + extensions = ["sphinx.ext.pngmath"] +else: + extensions = ["sphinx.ext.imgmath"] +# # Add any paths that contain templates here, relative to this directory. templates_path = ['_templates']