From: vsr Date: Fri, 20 Apr 2018 08:28:21 +0000 (+0300) Subject: 0023548: [CEA] Generation of documentation is broken if sphinxcontrib.napolen extensi... X-Git-Tag: V8_5_0rc1~1 X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=df4c8718db876f8a7da6482fbbe9773fcfb16c65;p=modules%2Fsmesh.git 0023548: [CEA] Generation of documentation is broken if sphinxcontrib.napolen extension is not available --- diff --git a/CMakeLists.txt b/CMakeLists.txt index 0d376e7f6..8c8dbfa0b 100755 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -132,6 +132,7 @@ IF(SALOME_BUILD_TESTS) ENDIF() IF(SALOME_BUILD_DOC) FIND_PACKAGE(SalomeDoxygen) + SET(Sphinx_EXTENSIONS sphinxcontrib.napoleon) FIND_PACKAGE(SalomeSphinx) SALOME_LOG_OPTIONAL_PACKAGE(Doxygen SALOME_BUILD_DOC) SALOME_LOG_OPTIONAL_PACKAGE(Sphinx SALOME_BUILD_DOC) diff --git a/doc/salome/gui/SMESH/conf.py.in b/doc/salome/gui/SMESH/conf.py.in index 3f592e436..4d56b1b02 100644 --- a/doc/salome/gui/SMESH/conf.py.in +++ b/doc/salome/gui/SMESH/conf.py.in @@ -23,9 +23,13 @@ import sys, os # 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.autodoc', - 'sphinxcontrib.napoleon' -] +extensions = ['sphinx.ext.autodoc'] +try: + import sphinxcontrib.napoleon + extensions += ['sphinxcontrib.napoleon'] +except: + pass + #add pdfbuilder to build a pdf with rst2pdf #extensions = ['rst2pdf.pdfbuilder']