1 # -*- coding: utf-8 -*-
3 # Copyright (C) 2008-2023 EDF R&D
5 # This file is part of SALOME ADAO module
7 # This library is free software; you can redistribute it and/or
8 # modify it under the terms of the GNU Lesser General Public
9 # License as published by the Free Software Foundation; either
10 # version 2.1 of the License.
12 # This library is distributed in the hope that it will be useful,
13 # but WITHOUT ANY WARRANTY; without even the implied warranty of
14 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
15 # Lesser General Public License for more details.
17 # You should have received a copy of the GNU Lesser General Public
18 # License along with this library; if not, write to the Free Software
19 # Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
21 # See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
23 # Author: Jean-Philippe Argaud, jean-philippe.argaud@edf.fr, EDF R&D
25 import sys, os, time, sphinx, logging
26 # logging.getLogger().setLevel(logging.DEBUG)
28 # -- Module version information --------------------------------------------------
31 sys.path.append(os.path.abspath("../../bin"))
33 logging.debug('Using "module_version" that was found from "bin"...')
37 sys.path.append(os.path.abspath("../../adao/adao/daCore"))
38 import version as module_version
39 logging.debug('Using "module_version" that was found from "daCore"...')
42 if "module_version" not in locals():
43 module_version = lambda : None
44 module_version.name = "ADAO"
45 module_version.year = "%s"%(time.localtime()[0],)
46 module_version.version = ""
47 logging.warning('Using fallback "module_version" because none was found')
49 # -- Project information -------------------------------------------------------
51 project = u'%s'%module_version.name
52 author = u'Jean-Philippe ARGAUD'
53 copyright = u'2008-%s, EDF R&D, %s'%(module_version.year,author)
54 version = '%s'%module_version.version
55 release = '%s'%module_version.version
56 doctitle = u"Documentation %s"%module_version.name
57 docfull = u"Assimilation de Données et Aide à l'Optimisation"
59 # -- General configuration -----------------------------------------------------
61 from distutils.version import LooseVersion #, StrictVersion
62 __lv = LooseVersion(sphinx.__version__)
63 if __lv < LooseVersion("1.4.0"):
64 extensions = ['sphinx.ext.pngmath']
65 logging.debug('Using "%s" extensions'%(extensions,))
67 extensions = ['sphinx.ext.imgmath']
68 logging.debug('Using "%s" extensions'%(extensions,))
70 import sphinx_rtd_theme
71 extensions += ['sphinx_rtd_theme']
73 logging.debug('Using "sphinx_rtd_theme" that was found')
76 logging.debug('Not using "sphinx_rtd_theme" because none was found')
78 source_suffix = '.rst'
79 source_encoding = 'utf-8'
92 templates_path = ['_templates']
93 exclude_trees = ['snippets',]
96 # -- Options for HTML output ---------------------------------------------------
99 html_theme = "sphinx_rtd_theme"
101 html_theme = 'default' if __lv < LooseVersion("1.3.0") else 'classic'
103 html_title = doctitle
104 html_static_path = ['_static']
105 html_show_sourcelink = False
106 html_search_language = language
107 html_favicon = 'resources/ADAO_favicon.ico'
109 # -- Options for HTMLHelp output -----------------------------------------------
111 htmlhelp_basename = module_version.name+'doc'
113 # -- Options for LaTeX output --------------------------------------------------
116 'papersize': 'a4paper',
118 'figure_align': 'htbp',
121 ('index', '%s.tex'%module_version.name, doctitle,
125 # -- Options for manual page output --------------------------------------------
128 (master_doc, '%s'%module_version.name, doctitle,
132 # -- Options for Texinfo output ------------------------------------------------
134 texinfo_documents = [
135 (master_doc, '%s'%module_version.name, doctitle,
136 author, '%s'%module_version.name, docfull,
140 # -- Options for Epub output ---------------------------------------------------
142 epub_title = doctitle
144 epub_publisher = author
145 epub_copyright = copyright
146 epub_exclude_files = ['search.html']
148 # -- Options for PDF output ----------------------------------------------------
152 u'%s'%module_version.name,
153 u'%s'%module_version.name,
155 dict(pdf_compressed = True),
157 pdf_stylesheets = ['sphinx','kerning','a4']
158 pdf_compressed = True
159 pdf_inline_footnotes = True
161 # -- Extension configuration ---------------------------------------------------