|
1 | 1 | #!/usr/bin/env python3
|
2 | 2 | # -*- coding: utf-8 -*-
|
3 |
| -# |
4 |
| -# ForTrilinos documentation build configuration file, created by |
5 |
| -# sphinx-quickstart on Thu Feb 23 20:41:01 2017. |
6 |
| -# |
7 |
| -# This file is execfile()d with the current directory set to its |
8 |
| -# containing dir. |
9 |
| -# |
10 |
| -# Note that not all possible configuration values are present in this |
11 |
| -# autogenerated file. |
12 |
| -# |
13 |
| -# All configuration values have a default; values that are commented out |
14 |
| -# serve to show the default. |
15 | 3 |
|
16 |
| -# If extensions (or modules to document with autodoc) are in another directory, |
17 |
| -# add these directories to sys.path here. If the directory is relative to the |
18 |
| -# documentation root, use os.path.abspath to make it absolute, like shown here. |
19 |
| -# |
20 |
| -# import os |
21 |
| -# import sys |
22 |
| -# sys.path.insert(0, os.path.abspath('.')) |
| 4 | +import os |
| 5 | +import json |
| 6 | +import sys |
| 7 | +from pathlib import Path |
23 | 8 |
|
24 | 9 | # -- General configuration ------------------------------------------------
|
25 | 10 |
|
|
49 | 34 |
|
50 | 35 | # General information about the project.
|
51 | 36 | project = 'ForTrilinos'
|
52 |
| -copyright = '2017–2020, Oak Ridge National Laboratory, UT-Battelle, LLC' |
| 37 | +copyright = '2017–2023, Oak Ridge National Laboratory, UT-Battelle, LLC' |
53 | 38 | all_authors = [
|
54 | 39 | "Seth R. Johnson",
|
55 | 40 | "Andrey Prokopenko"
|
56 | 41 | ]
|
57 | 42 | author = " and ".join(all_authors)
|
58 | 43 |
|
59 |
| -# The version info for the project you're documenting, acts as replacement for |
60 |
| -# |version| and |release|, also used in various other places throughout the |
61 |
| -# built documents. |
62 |
| -# |
63 |
| -# The short X.Y version. |
64 |
| -# TODO: import from git/cmake-generated version |
65 |
| -version = '' |
66 |
| -# The full version, including alpha/beta/rc tags. |
67 |
| -release = '' |
68 |
| - |
69 |
| -# The language for content autogenerated by Sphinx. Refer to documentation |
70 |
| -# for a list of supported languages. |
71 |
| -# |
72 |
| -# This is also used if you do content translation via gettext catalogs. |
73 |
| -# Usually you set "language" from the command line for these cases. |
74 |
| -language = None |
75 |
| - |
76 |
| -# There are two options for replacing |today|: either, you set today to some |
77 |
| -# non-false value, then it is used: |
78 |
| -# |
79 |
| -# today = '' |
80 |
| -# |
81 |
| -# Else, today_fmt is used as the format for a strftime call. |
82 |
| -# |
83 |
| -# today_fmt = '%B %d, %Y' |
| 44 | +try: |
| 45 | + build_dir = Path(os.environ['CMAKE_CURRENT_BINARY_DIR']) |
| 46 | + with open(build_dir / 'config.json', 'r') as f: |
| 47 | + cmake_config = json.load(f) |
| 48 | +except (KeyError, IOError) as e: |
| 49 | + print("Failed to load cmake config data:", e) |
| 50 | + build_dir = '.' |
| 51 | + |
| 52 | + cmake_config = { |
| 53 | + "version": "*unknown version*", |
| 54 | + "release": "*unknown release*", |
| 55 | + "options": {} |
| 56 | + } |
| 57 | + tags.add('noconfig') |
| 58 | + |
| 59 | +version = cmake_config['version'] |
| 60 | +release = cmake_config['release'] |
| 61 | +html_title = f"{project} {version} documentation" |
84 | 62 |
|
85 | 63 | # List of patterns, relative to source directory, that match files and
|
86 | 64 | # directories to ignore when looking for source files.
|
|
235 | 213 | # -- Options for LaTeX output ---------------------------------------------
|
236 | 214 |
|
237 | 215 | latex_elements = {
|
238 |
| - # The paper size ('letterpaper' or 'a4paper'). |
239 |
| - # |
240 |
| - # 'papersize': 'letterpaper', |
241 |
| - |
242 |
| - # The font size ('10pt', '11pt' or '12pt'). |
243 |
| - # |
244 |
| - # 'pointsize': '10pt', |
245 |
| - |
246 |
| - # Additional stuff for the LaTeX preamble. |
247 |
| - # |
248 |
| - # 'preamble': '', |
249 |
| - |
250 |
| - # Latex figure (float) alignment |
251 |
| - # |
252 |
| - # 'figure_align': 'htbp', |
253 | 216 | }
|
254 | 217 |
|
255 | 218 | # Grouping the document tree into LaTeX files. List of tuples
|
|
260 | 223 | r' \and '.join(all_authors), 'manual'),
|
261 | 224 | ]
|
262 | 225 |
|
263 |
| -# The name of an image file (relative to this directory) to place at the top of |
264 |
| -# the title page. |
265 |
| -# |
266 |
| -# latex_logo = None |
267 |
| - |
268 |
| -# For "manual" documents, if this is true, then toplevel headings are parts, |
269 |
| -# not chapters. |
270 |
| -# |
271 |
| -# latex_use_parts = False |
272 |
| - |
273 |
| -# If true, show page references after internal links. |
274 |
| -# |
275 |
| -# latex_show_pagerefs = False |
276 |
| - |
277 |
| -# If true, show URL addresses after external links. |
278 |
| -# |
279 |
| -# latex_show_urls = False |
280 |
| - |
281 |
| -# Documents to append as an appendix to all manuals. |
282 |
| -# |
283 |
| -# latex_appendices = [] |
284 |
| - |
285 |
| -# It false, will not define \strong, \code, itleref, \crossref ... but only |
286 |
| -# \sphinxstrong, ..., \sphinxtitleref, ... To help avoid clash with user added |
287 |
| -# packages. |
288 |
| -# |
289 |
| -# latex_keep_old_macro_names = True |
290 |
| - |
291 |
| -# If false, no module index is generated. |
292 |
| -# |
293 |
| -# latex_domain_indices = True |
294 |
| - |
295 |
| - |
296 | 226 | # -- Options for manual page output ---------------------------------------
|
297 | 227 |
|
298 | 228 | # One entry per manual page. List of tuples
|
|
302 | 232 | [author], 1)
|
303 | 233 | ]
|
304 | 234 |
|
305 |
| -# If true, show URL addresses after external links. |
306 |
| -# |
307 |
| -# man_show_urls = False |
308 |
| - |
309 |
| - |
310 | 235 | # -- Options for Texinfo output -------------------------------------------
|
311 | 236 |
|
312 | 237 | # Grouping the document tree into Texinfo files. List of tuples
|
|
317 | 242 | author, 'ForTrilinos', 'One line description of project.',
|
318 | 243 | 'Miscellaneous'),
|
319 | 244 | ]
|
320 |
| - |
321 |
| -# Documents to append as an appendix to all manuals. |
322 |
| -# |
323 |
| -# texinfo_appendices = [] |
324 |
| - |
325 |
| -# If false, no module index is generated. |
326 |
| -# |
327 |
| -# texinfo_domain_indices = True |
328 |
| - |
329 |
| -# How to display URL addresses: 'footnote', 'no', or 'inline'. |
330 |
| -# |
331 |
| -# texinfo_show_urls = 'footnote' |
332 |
| - |
333 |
| -# If true, do not generate a @detailmenu in the "Top" node's menu. |
334 |
| -# |
335 |
| -# texinfo_no_detailmenu = False |
336 |
| - |
337 |
| - |
338 |
| -# -- Options for Epub output ---------------------------------------------- |
339 |
| - |
340 |
| -# Bibliographic Dublin Core info. |
341 |
| -epub_title = project |
342 |
| -epub_author = author |
343 |
| -epub_publisher = author |
344 |
| -epub_copyright = copyright |
345 |
| - |
346 |
| -# The basename for the epub file. It defaults to the project name. |
347 |
| -# epub_basename = project |
348 |
| - |
349 |
| -# The HTML theme for the epub output. Since the default themes are not |
350 |
| -# optimized for small screen space, using the same theme for HTML and epub |
351 |
| -# output is usually not wise. This defaults to 'epub', a theme designed to save |
352 |
| -# visual space. |
353 |
| -# |
354 |
| -# epub_theme = 'epub' |
355 |
| - |
356 |
| -# The language of the text. It defaults to the language option |
357 |
| -# or 'en' if the language is not set. |
358 |
| -# |
359 |
| -# epub_language = '' |
360 |
| - |
361 |
| -# The scheme of the identifier. Typical schemes are ISBN or URL. |
362 |
| -# epub_scheme = '' |
363 |
| - |
364 |
| -# The unique identifier of the text. This can be a ISBN number |
365 |
| -# or the project homepage. |
366 |
| -# |
367 |
| -# epub_identifier = '' |
368 |
| - |
369 |
| -# A unique identification for the text. |
370 |
| -# |
371 |
| -# epub_uid = '' |
372 |
| - |
373 |
| -# A tuple containing the cover image and cover page html template filenames. |
374 |
| -# |
375 |
| -# epub_cover = () |
376 |
| - |
377 |
| -# A sequence of (type, uri, title) tuples for the guide element of content.opf. |
378 |
| -# |
379 |
| -# epub_guide = () |
380 |
| - |
381 |
| -# HTML files that should be inserted before the pages created by sphinx. |
382 |
| -# The format is a list of tuples containing the path and title. |
383 |
| -# |
384 |
| -# epub_pre_files = [] |
385 |
| - |
386 |
| -# HTML files that should be inserted after the pages created by sphinx. |
387 |
| -# The format is a list of tuples containing the path and title. |
388 |
| -# |
389 |
| -# epub_post_files = [] |
390 |
| - |
391 |
| -# A list of files that should not be packed into the epub file. |
392 | 245 | epub_exclude_files = ['search.html']
|
393 |
| - |
394 |
| -# The depth of the table of contents in toc.ncx. |
395 |
| -# |
396 |
| -# epub_tocdepth = 3 |
397 |
| - |
398 |
| -# Allow duplicate toc entries. |
399 |
| -# |
400 |
| -# epub_tocdup = True |
401 |
| - |
402 |
| -# Choose between 'default' and 'includehidden'. |
403 |
| -# |
404 |
| -# epub_tocscope = 'default' |
405 |
| - |
406 |
| -# Fix unsupported image types using the Pillow. |
407 |
| -# |
408 |
| -# epub_fix_images = False |
409 |
| - |
410 |
| -# Scale large images. |
411 |
| -# |
412 |
| -# epub_max_image_width = 0 |
413 |
| - |
414 |
| -# How to display URL addresses: 'footnote', 'no', or 'inline'. |
415 |
| -# |
416 |
| -# epub_show_urls = 'inline' |
417 |
| - |
418 |
| -# If false, no index is generated. |
419 |
| -# |
420 |
| -# epub_use_index = True |
0 commit comments