1#!/usr/bin/env python3 2# -*- coding: utf-8 -*- 3 4# 5# The Mesa 3D Graphics Library documentation build configuration file, created by 6# sphinx-quickstart on Wed Mar 29 14:08:51 2017. 7# 8# This file is execfile()d with the current directory set to its 9# containing dir. 10# 11# Note that not all possible configuration values are present in this 12# autogenerated file. 13# 14# All configuration values have a default; values that are commented out 15# serve to show the default. 16 17# If extensions (or modules to document with autodoc) are in another directory, 18# add these directories to sys.path here. If the directory is relative to the 19# documentation root, use os.path.abspath to make it absolute, like shown here. 20# 21import os 22import sys 23 24from hawkmoth.util import compiler 25 26# If extensions (or modules to document with autodoc) are in another directory, 27# add these directories to sys.path here. If the directory is relative to the 28# documentation root, use os.path.abspath to make it absolute, like shown here. 29sys.path.append(os.path.abspath('_exts')) 30 31 32# -- General configuration ------------------------------------------------ 33 34# If your documentation needs a minimal Sphinx version, state it here. 35# 36# needs_sphinx = '1.0' 37 38# Add any Sphinx extension module names here, as strings. They can be 39# extensions coming with Sphinx (named 'sphinx.ext.*') or your custom 40# ones. 41extensions = [ 42 'bootstrap', 43 'depfile', 44 'formatting', 45 'hawkmoth', 46 'nir', 47 'redirects', 48 'sphinx.ext.graphviz', 49] 50 51# Add any paths that contain templates here, relative to this directory. 52templates_path = ['_templates'] 53 54# The suffix(es) of source filenames. 55# You can specify multiple suffix as a list of string: 56# 57# source_suffix = ['.rst', '.md'] 58source_suffix = '.rst' 59 60# The master toctree document. 61master_doc = 'index' 62 63# General information about the project. 64project = 'The Mesa 3D Graphics Library' 65copyright = '1995-2018, Brian Paul' 66author = 'Brian Paul' 67html_show_copyright = False 68 69html_theme_path = ['.'] 70 71# The version info for the project you're documenting, acts as replacement for 72# |version| and |release|, also used in various other places throughout the 73# built documents. 74# 75# The short X.Y version. 76version = 'latest' 77# The full version, including alpha/beta/rc tags. 78release = 'latest' 79 80# The language for content autogenerated by Sphinx. Refer to documentation 81# for a list of supported languages. 82# 83# This is also used if you do content translation via gettext catalogs. 84# Usually you set "language" from the command line for these cases. 85language = 'en' 86 87# List of patterns, relative to source directory, that match files and 88# directories to ignore when looking for source files. 89# This patterns also effect to html_static_path and html_extra_path 90exclude_patterns = ['header-stubs'] 91 92# If true, `todo` and `todoList` produce output, else they produce nothing. 93todo_include_todos = False 94 95# Disable highlighting unless a language is specified, otherwise we'll get 96# python keywords highlit in literal blocks. 97highlight_language = 'none' 98 99default_role = 'c:expr' 100 101# -- Options for HTML output ---------------------------------------------- 102 103# The theme to use for HTML and HTML Help pages. See the documentation for 104# a list of builtin themes. 105# 106html_theme = 'mesa3d_theme' 107 108html_favicon = 'favicon.ico' 109 110html_copy_source = False 111 112# Add any paths that contain custom static files (such as style sheets) here, 113# relative to this directory. They are copied after the builtin static files, 114# so a file named "default.css" will overwrite the builtin "default.css". 115html_static_path = [] 116 117html_extra_path = [ 118 '_extra/', 119 'release-maintainers-keys.asc', 120 'features.txt', 121 'libGL.txt', 122 'README.UVD', 123 'README.VCE', 124] 125 126html_redirects = [ 127 ('webmaster', 'https://www.mesa3d.org/website/'), 128 ('developers', 'https://www.mesa3d.org/developers/'), 129 ('thanks', 'https://gitlab.freedesktop.org/mesa/mesa/-/blob/amber/docs/thanks.rst'), 130] 131 132 133# -- Options for linkcheck ------------------------------------------------ 134 135linkcheck_ignore = [ 136 r'specs/.*\.spec', # gets copied during the build process 137 r'news:.*', # seems linkcheck doesn't like the news: URI-scheme... 138 r'http://mesa-ci-results.jf.intel.com', # only available for Intel employees 139 r'https://gitlab.com/.*#.*', # needs JS eval 140 r'https://gitlab.freedesktop.org/.*#.*', # needs JS eval 141 r'https://github.com/.*#.*', # needs JS eval 142 r'https://www.intel.com/.*', # intel.com is blocking the linkcheck user-agent; maybe it can be customized to look like a browser? 143 r'https://cgit.freedesktop.org/.*', # cgit is no more 144] 145linkcheck_exclude_documents = [r'relnotes/.*'] 146 147linkcheck_allowed_redirects = { 148 # Pages that forward the front-page to a wiki or some explore-page 149 'https://www.freedesktop.org': 'https://www.freedesktop.org/wiki/', 150 'https://x.org': 'https://x.org/wiki/', 151 'https://perf.wiki.kernel.org/': 'https://perf.wiki.kernel.org/index.php/Main_Page', 152 'https://dri.freedesktop.org/': 'https://dri.freedesktop.org/wiki/', 153 'https://gitlab.freedesktop.org/': 'https://gitlab.freedesktop.org/explore/groups', 154 'https://www.sphinx-doc.org/': 'https://www.sphinx-doc.org/en/master/', 155 156 # Pages that requires authentication 157 'https://gitlab.freedesktop.org/admin/runners': 'https://gitlab.freedesktop.org/users/sign_in', 158 'https://gitlab.freedesktop.org/profile/personal_access_tokens': 'https://gitlab.freedesktop.org/users/sign_in', 159} 160 161 162# -- Options for HTMLHelp output ------------------------------------------ 163 164# Output file base name for HTML help builder. 165htmlhelp_basename = 'TheMesa3DGraphicsLibrarydoc' 166 167 168# -- Options for LaTeX output --------------------------------------------- 169 170latex_elements = { 171 # The paper size ('letterpaper' or 'a4paper'). 172 # 173 # 'papersize': 'letterpaper', 174 175 # The font size ('10pt', '11pt' or '12pt'). 176 # 177 # 'pointsize': '10pt', 178 179 # Additional stuff for the LaTeX preamble. 180 # 181 # 'preamble': '', 182 183 # Latex figure (float) alignment 184 # 185 # 'figure_align': 'htbp', 186} 187 188# Grouping the document tree into LaTeX files. List of tuples 189# (source start file, target name, title, 190# author, documentclass [howto, manual, or own class]). 191latex_documents = [ 192 (master_doc, 'TheMesa3DGraphicsLibrary.tex', 'The Mesa 3D Graphics Library Documentation', 193 'Brian Paul', 'manual'), 194] 195 196 197# -- Options for manual page output --------------------------------------- 198 199# One entry per manual page. List of tuples 200# (source start file, name, description, authors, manual section). 201man_pages = [ 202 (master_doc, 'themesa3dgraphicslibrary', 'The Mesa 3D Graphics Library Documentation', 203 [author], 1) 204] 205 206 207# -- Options for Texinfo output ------------------------------------------- 208 209# Grouping the document tree into Texinfo files. List of tuples 210# (source start file, target name, title, author, 211# dir menu entry, description, category) 212texinfo_documents = [ 213 (master_doc, 'TheMesa3DGraphicsLibrary', 'The Mesa 3D Graphics Library Documentation', 214 author, 'TheMesa3DGraphicsLibrary', 'One line description of project.', 215 'Miscellaneous'), 216] 217 218# -- Options for Graphviz ------------------------------------------------- 219 220graphviz_output_format = 'svg' 221 222# -- Options for hawkmoth ------------------------------------------------- 223 224hawkmoth_root = os.path.abspath(os.pardir) 225mesa_root = os.path.join(os.path.dirname(__file__), os.pardir) 226hawkmoth_clang = [ 227 '-I{}/docs/header-stubs/'.format(mesa_root), 228 '-I{}/include/'.format(mesa_root), 229 '-I{}/src/'.format(mesa_root), 230 '-I{}/src/gallium/include/'.format(mesa_root), 231 '-I{}/src/intel/'.format(mesa_root), 232 '-I{}/src/mesa/'.format(mesa_root), 233 '-DHAVE_STRUCT_TIMESPEC', 234 '-DHAVE_PTHREAD', 235 '-DHAVE_ENDIAN_H', 236] 237hawkmoth_clang.extend(compiler.get_include_args()) 238 239# helpers for definining parameter direction 240rst_prolog = ''' 241.. |in| replace:: **[in]** 242.. |out| replace:: **[out]** 243.. |inout| replace:: **[inout]** 244''' 245