File: conf.py

package info (click to toggle)
ecbuild 3.13.1-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 3,068 kB
  • sloc: sh: 1,404; perl: 732; f90: 472; cpp: 466; python: 383; ansic: 304; fortran: 43; makefile: 15
file content (53 lines) | stat: -rw-r--r-- 1,555 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
#=============================================================================
# CMake - Cross Platform Makefile Generator
# Copyright 2000-2013 Kitware, Inc., Insight Software Consortium
#
# Distributed under the OSI-approved BSD License (the "License");
# see accompanying file Copyright.txt for details.
#
# This software is distributed WITHOUT ANY WARRANTY; without even the
# implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
# See the License for more information.
#=============================================================================
import sys
import os
import re


def parse_version(ver_str):
    return re.sub("^((([0-9]+)\\.)+([0-9]+)).*", "\\1", ver_str)


here = os.path.abspath(os.path.dirname(__file__))
sys.path.insert(0, here)

source_suffix = '.rst'
master_doc = 'index'

project = 'ecBuild'
copyright = 'ECMWF'

with open(os.path.join(here, '..', 'VERSION'), 'r') as f:
    release = f.readline().strip() # full version string
version = parse_version(release) # feature version

primary_domain = 'cmake'

exclude_patterns = []

extensions = ['cmake']
templates_path = [os.path.join(here, 'templates')]

nitpicky = True

html_show_sourcelink = True
html_static_path = [os.path.join(here, 'static')]
html_theme = 'sphinx_rtd_theme'
html_title = 'ecBuild %s Documentation' % release
html_short_title = '%s Documentation' % release
html_favicon = os.path.join(here, 'static', 'ecbuild.ico')


# Extract the docs from the .cmake files
from generate import generate
generate(os.path.join(here, '..', 'cmake'))