1 # -*- coding: utf-8 -*-
3 # Copyright (C) 2008-2021 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
27 # -- Module version information --------------------------------------------------
30 sys.path.append(os.path.abspath("../../bin"))
32 logging.debug('Using "module_version" that was found from "bin"...')
36 sys.path.append(os.path.abspath("../../adao/adao/daCore"))
37 import version as module_version
38 logging.debug('Using "module_version" that was found from "daCore"...')
41 if "module_version" not in locals():
42 module_version = lambda : None
43 module_version.name = "ADAO"
44 module_version.year = "%s"%(time.localtime()[0],)
45 module_version.version = ""
46 logging.warning('Using fallback "module_version" because none was found')
48 # -- Project information -------------------------------------------------------
50 project = u'%s'%module_version.name
51 author = u'Jean-Philippe ARGAUD'
52 copyright = u'2008-%s, EDF R&D, %s'%(module_version.year,author)
53 version = '%s'%module_version.version
54 release = '%s'%module_version.version
55 doctitle = u"Documentation %s"%module_version.name
56 docfull = u"Assimilation de Données et Aide à l'Optimisation"
58 # -- General configuration -----------------------------------------------------
60 from distutils.version import LooseVersion #, StrictVersion
61 __lv = LooseVersion(sphinx.__version__)
62 if __lv < LooseVersion("1.4.0"):
63 extensions = ['sphinx.ext.pngmath']
65 extensions = ['sphinx.ext.imgmath']
67 import sphinx_rtd_theme
68 extensions += ['sphinx_rtd_theme']
70 logging.debug('Using "sphinx_rtd_theme" that was found')
73 logging.debug('Not using "sphinx_rtd_theme" because none was found')
75 source_suffix = '.rst'
76 source_encoding = 'utf-8'
89 templates_path = ['_templates']
90 exclude_trees = ['snippets',]
92 # -- Options for HTML output ---------------------------------------------------
95 html_theme = "sphinx_rtd_theme"
97 html_theme = 'default' if __lv < LooseVersion("1.3.0") else 'classic'
100 html_static_path = ['_static']
101 html_show_sourcelink = False
102 html_search_language = language
103 html_favicon = 'resources/ADAO_favicon.ico'
105 # -- Options for HTMLHelp output -----------------------------------------------
107 htmlhelp_basename = module_version.name+'doc'
109 # -- Options for LaTeX output --------------------------------------------------
112 'papersize': 'a4paper',
114 'figure_align': 'htbp',
117 ('index', '%s.tex'%module_version.name, doctitle,
121 # -- Options for manual page output --------------------------------------------
124 (master_doc, '%s'%module_version.name, doctitle,
128 # -- Options for Texinfo output ------------------------------------------------
130 texinfo_documents = [
131 (master_doc, '%s'%module_version.name, doctitle,
132 author, '%s'%module_version.name, docfull,
136 # -- Options for Epub output ---------------------------------------------------
138 epub_title = doctitle
140 epub_publisher = author
141 epub_copyright = copyright
142 epub_exclude_files = ['search.html']
144 # -- Options for PDF output ----------------------------------------------------
148 u'%s'%module_version.name,
149 u'%s'%module_version.name,
151 dict(pdf_compressed = True),
153 pdf_stylesheets = ['sphinx','kerning','a4']
154 pdf_compressed = True
155 pdf_inline_footnotes = True
157 # -- Extension configuration ---------------------------------------------------