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://dri.freedesktop.org/': 'https://dri.freedesktop.org/wiki/', 152 'https://gitlab.freedesktop.org/': 'https://gitlab.freedesktop.org/explore/groups', 153 'https://www.sphinx-doc.org/': 'https://www.sphinx-doc.org/en/master/', 154 155 # Pages that requires authentication 156 'https://gitlab.freedesktop.org/admin/runners': 'https://gitlab.freedesktop.org/users/sign_in', 157 'https://gitlab.freedesktop.org/profile/personal_access_tokens': 'https://gitlab.freedesktop.org/users/sign_in', 158} 159 160 161# -- Options for HTMLHelp output ------------------------------------------ 162 163# Output file base name for HTML help builder. 164htmlhelp_basename = 'TheMesa3DGraphicsLibrarydoc' 165 166 167# -- Options for LaTeX output --------------------------------------------- 168 169latex_elements = { 170 # The paper size ('letterpaper' or 'a4paper'). 171 # 172 # 'papersize': 'letterpaper', 173 174 # The font size ('10pt', '11pt' or '12pt'). 175 # 176 # 'pointsize': '10pt', 177 178 # Additional stuff for the LaTeX preamble. 179 # 180 # 'preamble': '', 181 182 # Latex figure (float) alignment 183 # 184 # 'figure_align': 'htbp', 185} 186 187# Grouping the document tree into LaTeX files. List of tuples 188# (source start file, target name, title, 189# author, documentclass [howto, manual, or own class]). 190latex_documents = [ 191 (master_doc, 'TheMesa3DGraphicsLibrary.tex', 'The Mesa 3D Graphics Library Documentation', 192 'Brian Paul', 'manual'), 193] 194 195 196# -- Options for manual page output --------------------------------------- 197 198# One entry per manual page. List of tuples 199# (source start file, name, description, authors, manual section). 200man_pages = [ 201 (master_doc, 'themesa3dgraphicslibrary', 'The Mesa 3D Graphics Library Documentation', 202 [author], 1) 203] 204 205 206# -- Options for Texinfo output ------------------------------------------- 207 208# Grouping the document tree into Texinfo files. List of tuples 209# (source start file, target name, title, author, 210# dir menu entry, description, category) 211texinfo_documents = [ 212 (master_doc, 'TheMesa3DGraphicsLibrary', 'The Mesa 3D Graphics Library Documentation', 213 author, 'TheMesa3DGraphicsLibrary', 'One line description of project.', 214 'Miscellaneous'), 215] 216 217# -- Options for Graphviz ------------------------------------------------- 218 219graphviz_output_format = 'svg' 220 221# -- Options for hawkmoth ------------------------------------------------- 222 223hawkmoth_root = os.path.abspath(os.pardir) 224mesa_root = os.path.join(os.path.dirname(__file__), os.pardir) 225hawkmoth_clang = [ 226 '-I{}/docs/header-stubs/'.format(mesa_root), 227 '-I{}/include/'.format(mesa_root), 228 '-I{}/src/'.format(mesa_root), 229 '-I{}/src/gallium/include/'.format(mesa_root), 230 '-I{}/src/intel/'.format(mesa_root), 231 '-I{}/src/mesa/'.format(mesa_root), 232 '-DHAVE_STRUCT_TIMESPEC', 233 '-DHAVE_PTHREAD', 234 '-DHAVE_ENDIAN_H', 235] 236hawkmoth_clang.extend(compiler.get_include_args()) 237 238# helpers for definining parameter direction 239rst_prolog = ''' 240.. |in| replace:: **[in]** 241.. |out| replace:: **[out]** 242.. |inout| replace:: **[inout]** 243''' 244