1 # -*- coding: utf-8 -*-
 
   6 sys.path.insert(0, os.path.abspath("../src"))
 
   8 # -- General configuration ------------------------------------------------
 
  10 # Add any Sphinx extension module names here, as strings. They can be
 
  11 # extensions coming with Sphinx (named 'sphinx.ext.*') or your custom
 
  15     "sphinx.ext.intersphinx",
 
  19 # Uncomment the below if you use native CircuitPython modules such as
 
  20 # digitalio, micropython and busio. List the modules you use. Without it, the
 
  21 # autodoc module docs will fail to generate with a warning.
 
  22 autodoc_mock_imports = ["machine", "Adafruit_GPIO"]
 
  24 intersphinx_mapping = {
 
  25     "python": ("https://docs.python.org/3.4", None),
 
  26     "CircuitPython": ("https://circuitpython.readthedocs.io/en/latest/", None),
 
  29 # Add any paths that contain templates here, relative to this directory.
 
  30 templates_path = ["_templates"]
 
  32 source_suffix = ".rst"
 
  34 # The master toctree document.
 
  37 # General information about the project.
 
  38 project = "Adafruit Blinka Library"
 
  39 copyright = "2017 cefn"
 
  42 # The version info for the project you're documenting, acts as replacement for
 
  43 # |version| and |release|, also used in various other places throughout the
 
  46 # The short X.Y version.
 
  48 # The full version, including alpha/beta/rc tags.
 
  51 # The language for content autogenerated by Sphinx. Refer to documentation
 
  52 # for a list of supported languages.
 
  54 # This is also used if you do content translation via gettext catalogs.
 
  55 # Usually you set "language" from the command line for these cases.
 
  58 # List of patterns, relative to source directory, that match files and
 
  59 # directories to ignore when looking for source files.
 
  60 # This patterns also effect to html_static_path and html_extra_path
 
  61 exclude_patterns = ["_build", "Thumbs.db", ".DS_Store", ".env", "CODE_OF_CONDUCT.md"]
 
  63 # The reST default role (used for this markup: `text`) to use for all
 
  68 # If true, '()' will be appended to :func: etc. cross-reference text.
 
  70 add_function_parentheses = True
 
  72 # The name of the Pygments (syntax highlighting) style to use.
 
  73 pygments_style = "sphinx"
 
  75 # If true, `todo` and `todoList` produce output, else they produce nothing.
 
  76 todo_include_todos = False
 
  78 # If this is True, todo emits a warning for each TODO entries. The default is False.
 
  79 todo_emit_warnings = True
 
  82 # -- Options for HTML output ----------------------------------------------
 
  84 # The theme to use for HTML and HTML Help pages.  See the documentation for
 
  85 # a list of builtin themes.
 
  87 on_rtd = os.environ.get("READTHEDOCS", None) == "True"
 
  89 if not on_rtd:  # only import and set the theme if we're building docs locally
 
  91         import sphinx_rtd_theme
 
  93         html_theme = "sphinx_rtd_theme"
 
  94         html_theme_path = [sphinx_rtd_theme.get_html_theme_path(), "."]
 
  96         html_theme = "default"
 
  97         html_theme_path = ["."]
 
  99     html_theme_path = ["."]
 
 101 # Add any paths that contain custom static files (such as style sheets) here,
 
 102 # relative to this directory. They are copied after the builtin static files,
 
 103 # so a file named "default.css" will overwrite the builtin "default.css".
 
 104 html_static_path = ["_static"]
 
 106 # Output file base name for HTML help builder.
 
 107 htmlhelp_basename = "AdafruitBlinkaLibrarydoc"
 
 109 # -- Options for LaTeX output ---------------------------------------------
 
 112     # The paper size ('letterpaper' or 'a4paper').
 
 114     # 'papersize': 'letterpaper',
 
 115     # The font size ('10pt', '11pt' or '12pt').
 
 117     # 'pointsize': '10pt',
 
 118     # Additional stuff for the LaTeX preamble.
 
 121     # Latex figure (float) alignment
 
 123     # 'figure_align': 'htbp',
 
 126 # Grouping the document tree into LaTeX files. List of tuples
 
 127 # (source start file, target name, title,
 
 128 #  author, documentclass [howto, manual, or own class]).
 
 132         "AdafruitBlinkaLibrary.tex",
 
 133         "AdafruitBlinka Library Documentation",
 
 139 # -- Options for manual page output ---------------------------------------
 
 141 # One entry per manual page. List of tuples
 
 142 # (source start file, name, description, authors, manual section).
 
 146         "AdafruitBlinkalibrary",
 
 147         "Adafruit Blinka Library Documentation",
 
 153 # -- Options for Texinfo output -------------------------------------------
 
 155 # Grouping the document tree into Texinfo files. List of tuples
 
 156 # (source start file, target name, title, author,
 
 157 #  dir menu entry, description, category)
 
 158 texinfo_documents = [
 
 161         "AdafruitBlinkaLibrary",
 
 162         "Adafruit Blinka Library Documentation",
 
 164         "AdafruitBlinkaLibrary",
 
 165         "One line description of project.",