Salome HOME
Minor source update for OM compatibility
[modules/adao.git] / doc / en / conf.py
1 # -*- coding: utf-8 -*-
2 #
3 # Copyright (C) 2008-2024 EDF R&D
4 #
5 # This file is part of SALOME ADAO module
6 #
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.
11 #
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.
16 #
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
20 #
21 # See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
22 #
23 # Author: Jean-Philippe Argaud, jean-philippe.argaud@edf.fr, EDF R&D
24
25 import sys, os, time, sphinx, logging
26 # logging.getLogger().setLevel(logging.DEBUG)
27
28 # -- Module version information --------------------------------------------------
29
30 try:
31     sys.path.append(os.path.abspath("../../bin"))
32     import module_version
33     logging.debug('Using "module_version" that was found from "bin"...')
34 except:
35     pass
36 try:
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"...')
40 except:
41     pass
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')
48
49 # -- Project information -------------------------------------------------------
50
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"%s documentation"%module_version.name
57 docfull   = u"Aiding for Data Assimilation and Optimization"
58
59 # -- General configuration -----------------------------------------------------
60
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,))
66 else:
67     extensions = ['sphinx.ext.imgmath']
68     logging.debug('Using "%s" extensions'%(extensions,))
69 try:
70     import sphinx_rtd_theme
71     extensions += ['sphinx_rtd_theme']
72     use_rtd_theme = True
73     logging.debug('Using "sphinx_rtd_theme" that was found')
74 except:
75     use_rtd_theme = False
76     logging.debug('Not using "sphinx_rtd_theme" because none was found')
77 #
78 source_suffix    = '.rst'
79 source_encoding  = 'utf-8'
80 master_doc       = 'index'
81 language         = 'en'
82 exclude_patterns = [
83     'snippets',
84     'scripts',
85     'resources',
86     '_build',
87     'Thumbs.db',
88     '.DS_Store',
89     'Grenier',
90     ]
91 pygments_style   = None
92 templates_path   = ['_templates']
93 exclude_trees    = ['snippets',]
94 numfig           = True
95
96 # -- Options for HTML output ---------------------------------------------------
97
98 if use_rtd_theme:
99     html_theme       = "sphinx_rtd_theme"
100 else:
101     html_theme       = 'default' if __lv < LooseVersion("1.3.0") else 'classic'
102 #
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'
108
109 # -- Options for HTMLHelp output -----------------------------------------------
110
111 htmlhelp_basename    = module_version.name+'doc'
112
113 # -- Options for LaTeX output --------------------------------------------------
114
115 latex_elements = {
116     'papersize': 'a4paper',
117     'pointsize': '10pt',
118     'figure_align': 'htbp',
119 }
120 latex_documents = [
121   ('index', '%s.tex'%module_version.name, doctitle,
122    author, 'manual'),
123 ]
124
125 # -- Options for manual page output --------------------------------------------
126
127 man_pages = [
128     (master_doc, '%s'%module_version.name, doctitle,
129      [author], 1)
130 ]
131
132 # -- Options for Texinfo output ------------------------------------------------
133
134 texinfo_documents = [
135     (master_doc, '%s'%module_version.name, doctitle,
136      author, '%s'%module_version.name, docfull,
137      'Miscellaneous'),
138 ]
139
140 # -- Options for Epub output ---------------------------------------------------
141
142 epub_title         = doctitle
143 epub_author        = author
144 epub_publisher     = author
145 epub_copyright     = copyright
146 epub_exclude_files = ['search.html']
147
148 # -- Options for PDF output ----------------------------------------------------
149
150 pdf_documents = [(
151     'contents',
152     u'%s'%module_version.name,
153     u'%s'%module_version.name,
154     author,
155     dict(pdf_compressed = True),
156 ),]
157 pdf_stylesheets = ['sphinx','kerning','a4']
158 pdf_compressed = True
159 pdf_inline_footnotes = True
160
161 # -- Extension configuration ---------------------------------------------------