Warning, /frameworks/extra-cmake-modules/docs/sphinx/conf.py.in is written in an unsupported language. File is not indexed.

0001 #=============================================================================
0002 # CMake - Cross Platform Makefile Generator
0003 # SPDX-FileCopyrightText: 2000-2013 Kitware Inc., Insight Software Consortium
0004 #
0005 # SPDX-License-Identifier: BSD-3-Clause
0006 #=============================================================================
0007 import sys
0008 import os
0009 import re
0010 import glob
0011 
0012 sys.path.insert(0, r'@CMAKE_CURRENT_SOURCE_DIR@/sphinx/ext')
0013 
0014 source_suffix = '.rst'
0015 master_doc = 'index'
0016 
0017 project = 'Extra CMake Modules'
0018 copyright = 'KDE Developers'
0019 version = '@PROJECT_VERSION_MAJOR@.@PROJECT_VERSION_MINOR@' # feature version
0020 release = '@PROJECT_VERSION@' # full version string
0021 
0022 primary_domain = 'ecm'
0023 
0024 exclude_patterns = []
0025 
0026 extensions = ['ecm']
0027 
0028 ecm_manuals = sorted(glob.glob(r'@CMAKE_CURRENT_SOURCE_DIR@/manual/*.rst'))
0029 ecm_manual_description = re.compile('^\.\. ecm-manual-description:(.*)$')
0030 man_pages = []
0031 for fpath in ecm_manuals:
0032     try:
0033         name, sec, rst = os.path.basename(fpath).split('.')
0034         desc = None
0035         f = open(fpath, 'r')
0036         for l in f:
0037             m = ecm_manual_description.match(l)
0038             if m:
0039                 desc = m.group(1).strip()
0040                 break
0041         f.close()
0042         if desc:
0043             man_pages.append(('manual/%s.%s' % (name, sec),
0044                               name, desc, [], int(sec)))
0045         else:
0046             sys.stderr.write("ERROR: No ecm-manual-description in '%s'\n" % fpath)
0047     except Exception as e:
0048         sys.stderr.write("ERROR: %s\n" % str(e))
0049 man_show_urls = False
0050 
0051 html_show_sourcelink = True
0052 html_static_path = ['@CMAKE_CURRENT_BINARY_DIR@/static']
0053 html_style = 'ecm.css'
0054 html_theme = '@sphinx_theme@'
0055 html_short_title = 'ECM %s documentation' % version
0056 html_favicon = '@CMAKE_CURRENT_SOURCE_DIR@/sphinx/kde-favicon.ico'