1# -*- coding: utf-8 -*- 2# 3# libcbor documentation build configuration file, created by 4# sphinx-quickstart on Sun Jun 8 13:27:19 2014. 5# 6# This file is execfile()d with the current directory set to its 7# containing dir. 8# 9# Note that not all possible configuration values are present in this 10# autogenerated file. 11# 12# All configuration values have a default; values that are commented out 13# serve to show the default. 14 15import sys 16import os 17 18# If extensions (or modules to document with autodoc) are in another directory, 19# add these directories to sys.path here. If the directory is relative to the 20# documentation root, use os.path.abspath to make it absolute, like shown here. 21#sys.path.insert(0, os.path.abspath('.')) 22sys.path.append(os.path.abspath(os.path.dirname(__file__))) 23 24# -- General configuration ------------------------------------------------ 25 26# If your documentation needs a minimal Sphinx version, state it here. 27#needs_sphinx = '1.0' 28 29# Add any Sphinx extension module names here, as strings. They can be 30# extensions coming with Sphinx (named 'sphinx.ext.*') or your custom 31# ones. 32extensions = [ 33 'breathe', 34 'sphinx.ext.mathjax', 35 'sphinx.ext.autodoc', 36 'sphinx.ext.ifconfig' 37] 38 39import subprocess, os 40 41# on_rtd is whether we are on readthedocs.org, this line of code grabbed from docs.readthedocs.org 42on_rtd = os.environ.get('READTHEDOCS', None) == 'True' 43print(subprocess.check_output('cd ../..; mkdir doc/build; doxygen', shell=True)) 44 45if on_rtd: 46 print(subprocess.check_output('cd ../..; mkdir doc/build; doxygen', shell=True)) 47 48 49print(os.getcwd()) 50print(os.getcwd() + '/../build/doxygen/xml') 51 52breathe_projects = { 53 'libcbor': '../build/doxygen/xml' 54} 55 56breathe_default_project = "libcbor" 57 58# Add any paths that contain templates here, relative to this directory. 59templates_path = ['_templates'] 60 61# The suffix of source filenames. 62source_suffix = '.rst' 63 64# The encoding of source files. 65#source_encoding = 'utf-8-sig' 66 67# The master toctree document. 68master_doc = 'index' 69 70# General information about the project. 71project = 'libcbor' 72copyright = '2014 - 2020, Pavel Kalvoda' 73 74# The version info for the project you're documenting, acts as replacement for 75# |version| and |release|, also used in various other places throughout the 76# built documents. 77# 78# The short X.Y version. 79version = '0.10' 80release = '0.10.2' 81 82# The language for content autogenerated by Sphinx. Refer to documentation 83# for a list of supported languages. 84#language = None 85 86# There are two options for replacing |today|: either, you set today to some 87# non-false value, then it is used: 88#today = '' 89# Else, today_fmt is used as the format for a strftime call. 90#today_fmt = '%B %d, %Y' 91 92# List of patterns, relative to source directory, that match files and 93# directories to ignore when looking for source files. 94# https://github.com/michaeljones/breathe/issues/197 95exclude_patterns = ['breathe/*'] 96 97# The reST default role (used for this markup: `text`) to use for all 98# documents. 99breathe_domain_by_extension = { 100 "h" : "C", 101 } 102#default_role = 'c:func' 103primary_domain = "cpp" 104 105# If true, '()' will be appended to :func: etc. cross-reference text. 106add_function_parentheses = True 107 108# If true, the current module name will be prepended to all description 109# unit titles (such as .. function::). 110#add_module_names = True 111 112# If true, sectionauthor and moduleauthor directives will be shown in the 113# output. They are ignored by default. 114#show_authors = False 115 116# The name of the Pygments (syntax highlighting) style to use. 117pygments_style = 'sphinx' 118 119# A list of ignored prefixes for module index sorting. 120#modindex_common_prefix = [] 121 122# If true, keep warnings as "system message" paragraphs in the built documents. 123#keep_warnings = False 124 125 126# -- Options for HTML output ---------------------------------------------- 127 128# The theme to use for HTML and HTML Help pages. See the documentation for 129# a list of builtin themes. 130html_theme = 'default' 131 132# Theme options are theme-specific and customize the look and feel of a theme 133# further. For a list of options available for each theme, see the 134# documentation. 135#html_theme_options = {} 136 137# Add any paths that contain custom themes here, relative to this directory. 138#html_theme_path = [] 139 140# The name for this set of Sphinx documents. If None, it defaults to 141# "<project> v<release> documentation". 142#html_title = None 143 144# A shorter title for the navigation bar. Default is the same as html_title. 145#html_short_title = None 146 147# The name of an image file (relative to this directory) to place at the top 148# of the sidebar. 149#html_logo = None 150 151# The name of an image file (within the static path) to use as favicon of the 152# docs. This file should be a Windows icon file (.ico) being 16x16 or 32x32 153# pixels large. 154#html_favicon = None 155 156# Add any paths that contain custom static files (such as style sheets) here, 157# relative to this directory. They are copied after the builtin static files, 158# so a file named "default.css" will overwrite the builtin "default.css". 159html_static_path = [] 160 161# Add any extra paths that contain custom files (such as robots.txt or 162# .htaccess) here, relative to this directory. These files are copied 163# directly to the root of the documentation. 164#html_extra_path = [] 165 166# If not '', a 'Last updated on:' timestamp is inserted at every page bottom, 167# using the given strftime format. 168#html_last_updated_fmt = '%b %d, %Y' 169 170# If true, SmartyPants will be used to convert quotes and dashes to 171# typographically correct entities. 172#html_use_smartypants = True 173 174# Custom sidebar templates, maps document names to template names. 175#html_sidebars = {} 176 177# Additional templates that should be rendered to pages, maps page names to 178# template names. 179#html_additional_pages = {} 180 181# If false, no module index is generated. 182#html_domain_indices = True 183 184# If false, no index is generated. 185#html_use_index = True 186 187# If true, the index is split into individual pages for each letter. 188#html_split_index = False 189 190# If true, links to the reST sources are added to the pages. 191#html_show_sourcelink = True 192 193# If true, "Created using Sphinx" is shown in the HTML footer. Default is True. 194#html_show_sphinx = True 195 196# If true, "(C) Copyright ..." is shown in the HTML footer. Default is True. 197#html_show_copyright = True 198 199# If true, an OpenSearch description file will be output, and all pages will 200# contain a <link> tag referring to it. The value of this option must be the 201# base URL from which the finished HTML is served. 202#html_use_opensearch = '' 203 204# This is the file name suffix for HTML files (e.g. ".xhtml"). 205#html_file_suffix = None 206 207# Output file base name for HTML help builder. 208htmlhelp_basename = 'libcbordoc' 209 210 211# -- Options for LaTeX output --------------------------------------------- 212 213latex_elements = { 214# The paper size ('letterpaper' or 'a4paper'). 215#'papersize': 'letterpaper', 216 217# The font size ('10pt', '11pt' or '12pt'). 218#'pointsize': '10pt', 219 220# Additional stuff for the LaTeX preamble. 221#'preamble': '', 222} 223 224# Grouping the document tree into LaTeX files. List of tuples 225# (source start file, target name, title, 226# author, documentclass [howto, manual, or own class]). 227latex_documents = [ 228 ('index', 'libcbor.tex', 'libcbor Documentation', 229 'Pavel Kalvoda', 'manual'), 230] 231 232# The name of an image file (relative to this directory) to place at the top of 233# the title page. 234#latex_logo = None 235 236# For "manual" documents, if this is true, then toplevel headings are parts, 237# not chapters. 238#latex_use_parts = False 239 240# If true, show page references after internal links. 241#latex_show_pagerefs = False 242 243# If true, show URL addresses after external links. 244#latex_show_urls = False 245 246# Documents to append as an appendix to all manuals. 247#latex_appendices = [] 248 249# If false, no module index is generated. 250#latex_domain_indices = True 251 252 253# -- Options for manual page output --------------------------------------- 254 255# One entry per manual page. List of tuples 256# (source start file, name, description, authors, manual section). 257man_pages = [ 258 ('index', 'libcbor', 'libcbor Documentation', 259 ['Pavel Kalvoda'], 3) 260] 261 262# If true, show URL addresses after external links. 263#man_show_urls = False 264 265 266# -- Options for Texinfo output ------------------------------------------- 267 268# Grouping the document tree into Texinfo files. List of tuples 269# (source start file, target name, title, author, 270# dir menu entry, description, category) 271texinfo_documents = [ 272 ('index', 'libcbor', 'libcbor Documentation', 273 'Pavel Kalvoda', 'libcbor', 'C library for parsing and generating CBOR.', 274 'Miscellaneous'), 275] 276 277# Documents to append as an appendix to all manuals. 278#texinfo_appendices = [] 279 280# If false, no module index is generated. 281#texinfo_domain_indices = True 282 283# How to display URL addresses: 'footnote', 'no', or 'inline'. 284#texinfo_show_urls = 'footnote' 285 286# If true, do not generate a @detailmenu in the "Top" node's menu. 287#texinfo_no_detailmenu = False 288 289 290if not on_rtd: # only import and set the theme if we're building docs locally 291 import sphinx_rtd_theme 292 html_theme = 'sphinx_rtd_theme' 293 html_theme_path = [sphinx_rtd_theme.get_html_theme_path()] 294 295# otherwise, readthedocs.org uses their theme by default, so no need to specify it 296 297