From df4c8718db876f8a7da6482fbbe9773fcfb16c65 Mon Sep 17 00:00:00 2001 From: vsr Date: Fri, 20 Apr 2018 11:28:21 +0300 Subject: [PATCH] 0023548: [CEA] Generation of documentation is broken if sphinxcontrib.napolen extension is not available --- CMakeLists.txt | 1 + doc/salome/gui/SMESH/conf.py.in | 10 +++++++--- 2 files changed, 8 insertions(+), 3 deletions(-) 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'] -- 2.39.2