Salome HOME
cht version
[tools/eficas.git] / Doc / conf.py
1 # -*- coding: utf-8 -*-
2 #
3 # Copyright (C) 2001-2020 EDF R&D
4 #
5 # This file is part of SALOME EFICAS 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
27 # -- Module version information --------------------------------------------------
28
29 if "module_version" not in locals():
30     module_version = lambda : None
31     module_version.name    = "EFICAS_NOUVEAU"
32     module_version.year    = "%s"%(time.localtime()[0],)
33     module_version.version = ""
34     logging.warning('Using fallback "module_version" because none was found')
35
36 # -- Project information -------------------------------------------------------
37
38 project   = u'%s'%module_version.name
39 author    = u'Pascale NOYRET'
40 copyright = u'2001-%s, EDF R&D, %s'%(module_version.year,author)
41 version   = '%s'%module_version.version
42 release   = '%s'%module_version.version
43 doctitle  = u"%s documentation"%module_version.name
44 docfull   = u"Editeur de FIchier de Commandes et Analyseur Sémantique"
45
46 # -- General configuration -----------------------------------------------------
47
48 from distutils.version import LooseVersion #, StrictVersion
49 __lv = LooseVersion(sphinx.__version__)
50 if __lv < LooseVersion("1.4.0"):
51     extensions = ['sphinx.ext.pngmath']
52 else:
53     extensions = ['sphinx.ext.imgmath']
54 try:
55     import sphinx_rtd_theme
56     extensions += ['sphinx_rtd_theme']
57     use_rtd_theme = True
58     logging.debug('Using "sphinx_rtd_theme" that was found')
59 except:
60     use_rtd_theme = False
61     logging.debug('Not using "sphinx_rtd_theme" because none was found')
62 #
63 source_suffix    = '.rst'
64 source_encoding  = 'utf-8'
65 master_doc       = 'index'
66 language         = 'en'
67 exclude_patterns = [
68     '_build',
69     'Thumbs.db',
70     '.DS_Store',
71     ]
72 pygments_style   = None
73 templates_path   = ['_templates']
74
75 # -- Options for HTML output ---------------------------------------------------
76
77 if use_rtd_theme:
78     html_theme       = "sphinx_rtd_theme"
79 else:
80     html_theme       = 'default' if __lv < LooseVersion("1.3.0") else 'classic'
81 #
82 html_title           = doctitle
83 html_static_path     = ['_static']
84 html_show_sourcelink = False
85 html_search_language = language
86
87 # -- Options for HTMLHelp output -----------------------------------------------
88
89 htmlhelp_basename    = module_version.name+'doc'
90
91 # -- Options for LaTeX output --------------------------------------------------
92
93 latex_elements = {
94     'papersize': 'a4paper',
95     'pointsize': '10pt',
96     'figure_align': 'htbp',
97 }
98 latex_documents = [
99   ('index', '%s.tex'%module_version.name, doctitle,
100    author, 'manual'),
101 ]
102
103 # -- Options for manual page output --------------------------------------------
104
105 man_pages = [
106     (master_doc, '%s'%module_version.name, doctitle,
107      [author], 1)
108 ]
109
110 # -- Options for Texinfo output ------------------------------------------------
111
112 texinfo_documents = [
113     (master_doc, '%s'%module_version.name, doctitle,
114      author, '%s'%module_version.name, docfull,
115      'Miscellaneous'),
116 ]
117
118 # -- Options for Epub output ---------------------------------------------------
119
120 epub_title         = doctitle
121 epub_author        = author
122 epub_publisher     = author
123 epub_copyright     = copyright
124 epub_exclude_files = ['search.html']
125
126 # -- Options for PDF output ----------------------------------------------------
127
128 pdf_documents = [(
129     'contents',
130     u'%s'%module_version.name,
131     u'%s'%module_version.name,
132     author,
133     dict(pdf_compressed = True),
134 ),]
135 pdf_stylesheets = ['sphinx','kerning','a4']
136 pdf_compressed = True
137 pdf_inline_footnotes = True
138
139 # -- Extension configuration ---------------------------------------------------