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