Salome HOME
0023548: [CEA] Generation of documentation is broken if sphinxcontrib.napolen extensi...
authorvsr <vsr@opencascade.com>
Fri, 20 Apr 2018 08:28:21 +0000 (11:28 +0300)
committervsr <vsr@opencascade.com>
Fri, 20 Apr 2018 08:28:21 +0000 (11:28 +0300)
CMakeLists.txt
doc/salome/gui/SMESH/conf.py.in

index 0d376e7..8c8dbfa 100755 (executable)
@@ -132,6 +132,7 @@ IF(SALOME_BUILD_TESTS)
 ENDIF()
 IF(SALOME_BUILD_DOC)
   FIND_PACKAGE(SalomeDoxygen)
 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)
   FIND_PACKAGE(SalomeSphinx)
   SALOME_LOG_OPTIONAL_PACKAGE(Doxygen SALOME_BUILD_DOC)
   SALOME_LOG_OPTIONAL_PACKAGE(Sphinx SALOME_BUILD_DOC)
index 3f592e4..4d56b1b 100644 (file)
@@ -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.
 
 # 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']
 
 #add pdfbuilder to build a pdf with rst2pdf
 #extensions = ['rst2pdf.pdfbuilder']