0023548: [CEA] Generation of documentation is broken if sphinxcontrib.napolen extension is not available

This commit is contained in:
vsr 2018-04-20 11:28:21 +03:00
parent d8bc110152
commit df4c8718db
2 changed files with 8 additions and 3 deletions

View File

@ -132,6 +132,7 @@ IF(SALOME_BUILD_TESTS)
ENDIF() ENDIF()
IF(SALOME_BUILD_DOC) IF(SALOME_BUILD_DOC)
FIND_PACKAGE(SalomeDoxygen) FIND_PACKAGE(SalomeDoxygen)
SET(Sphinx_EXTENSIONS sphinxcontrib.napoleon)
FIND_PACKAGE(SalomeSphinx) FIND_PACKAGE(SalomeSphinx)
SALOME_LOG_OPTIONAL_PACKAGE(Doxygen SALOME_BUILD_DOC) SALOME_LOG_OPTIONAL_PACKAGE(Doxygen SALOME_BUILD_DOC)
SALOME_LOG_OPTIONAL_PACKAGE(Sphinx SALOME_BUILD_DOC) SALOME_LOG_OPTIONAL_PACKAGE(Sphinx SALOME_BUILD_DOC)

View File

@ -23,9 +23,13 @@ import sys, os
# Add any Sphinx extension module names here, as strings. They can be extensions # Add any Sphinx extension module names here, as strings. They can be extensions
# coming with Sphinx (named 'sphinx.ext.*') or your custom ones. # coming with Sphinx (named 'sphinx.ext.*') or your custom ones.
extensions = ['sphinx.ext.autodoc', extensions = ['sphinx.ext.autodoc']
'sphinxcontrib.napoleon' try:
] import sphinxcontrib.napoleon
extensions += ['sphinxcontrib.napoleon']
except:
pass
#add pdfbuilder to build a pdf with rst2pdf #add pdfbuilder to build a pdf with rst2pdf
#extensions = ['rst2pdf.pdfbuilder'] #extensions = ['rst2pdf.pdfbuilder']