You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

150 lines
4.8 KiB

6 years ago
  1. # -*- coding: utf-8 -*-
  2. import os
  3. import sys
  4. sys.path.insert(0, os.path.abspath('..'))
  5. # -- General configuration ------------------------------------------------
  6. # Add any Sphinx extension module names here, as strings. They can be
  7. # extensions coming with Sphinx (named 'sphinx.ext.*') or your custom
  8. # ones.
  9. extensions = [
  10. 'sphinx.ext.autodoc',
  11. 'sphinx.ext.intersphinx',
  12. 'sphinx.ext.todo',
  13. ]
  14. # Uncomment the below if you use native CircuitPython modules such as
  15. # digitalio, micropython and busio. List the modules you use. Without it, the
  16. # autodoc module docs will fail to generate with a warning.
  17. # autodoc_mock_imports = ["digitalio", "busio"]
  18. intersphinx_mapping = {'python': ('https://docs.python.org/3.4', None),'CircuitPython': ('https://circuitpython.readthedocs.io/en/latest/', None)}
  19. # Add any paths that contain templates here, relative to this directory.
  20. templates_path = ['_templates']
  21. source_suffix = '.rst'
  22. # The master toctree document.
  23. master_doc = 'index'
  24. # General information about the project.
  25. project = u'Adafruit Blinka Library'
  26. copyright = u'2017 cefn'
  27. author = u'cefn'
  28. # The version info for the project you're documenting, acts as replacement for
  29. # |version| and |release|, also used in various other places throughout the
  30. # built documents.
  31. #
  32. # The short X.Y version.
  33. version = u'1.0'
  34. # The full version, including alpha/beta/rc tags.
  35. release = u'1.0'
  36. # The language for content autogenerated by Sphinx. Refer to documentation
  37. # for a list of supported languages.
  38. #
  39. # This is also used if you do content translation via gettext catalogs.
  40. # Usually you set "language" from the command line for these cases.
  41. language = None
  42. # List of patterns, relative to source directory, that match files and
  43. # directories to ignore when looking for source files.
  44. # This patterns also effect to html_static_path and html_extra_path
  45. exclude_patterns = ['_build', 'Thumbs.db', '.DS_Store', '.env', 'CODE_OF_CONDUCT.md']
  46. # The reST default role (used for this markup: `text`) to use for all
  47. # documents.
  48. #
  49. default_role = "any"
  50. # If true, '()' will be appended to :func: etc. cross-reference text.
  51. #
  52. add_function_parentheses = True
  53. # The name of the Pygments (syntax highlighting) style to use.
  54. pygments_style = 'sphinx'
  55. # If true, `todo` and `todoList` produce output, else they produce nothing.
  56. todo_include_todos = False
  57. # If this is True, todo emits a warning for each TODO entries. The default is False.
  58. todo_emit_warnings = True
  59. # -- Options for HTML output ----------------------------------------------
  60. # The theme to use for HTML and HTML Help pages. See the documentation for
  61. # a list of builtin themes.
  62. #
  63. on_rtd = os.environ.get('READTHEDOCS', None) == 'True'
  64. if not on_rtd: # only import and set the theme if we're building docs locally
  65. try:
  66. import sphinx_rtd_theme
  67. html_theme = 'sphinx_rtd_theme'
  68. html_theme_path = [sphinx_rtd_theme.get_html_theme_path(), '.']
  69. except:
  70. html_theme = 'default'
  71. html_theme_path = ['.']
  72. else:
  73. html_theme_path = ['.']
  74. # Add any paths that contain custom static files (such as style sheets) here,
  75. # relative to this directory. They are copied after the builtin static files,
  76. # so a file named "default.css" will overwrite the builtin "default.css".
  77. html_static_path = ['_static']
  78. # Output file base name for HTML help builder.
  79. htmlhelp_basename = 'AdafruitBlinkaLibrarydoc'
  80. # -- Options for LaTeX output ---------------------------------------------
  81. latex_elements = {
  82. # The paper size ('letterpaper' or 'a4paper').
  83. #
  84. # 'papersize': 'letterpaper',
  85. # The font size ('10pt', '11pt' or '12pt').
  86. #
  87. # 'pointsize': '10pt',
  88. # Additional stuff for the LaTeX preamble.
  89. #
  90. # 'preamble': '',
  91. # Latex figure (float) alignment
  92. #
  93. # 'figure_align': 'htbp',
  94. }
  95. # Grouping the document tree into LaTeX files. List of tuples
  96. # (source start file, target name, title,
  97. # author, documentclass [howto, manual, or own class]).
  98. latex_documents = [
  99. (master_doc, 'AdafruitBlinkaLibrary.tex', u'AdafruitBlinka Library Documentation',
  100. author, 'manual'),
  101. ]
  102. # -- Options for manual page output ---------------------------------------
  103. # One entry per manual page. List of tuples
  104. # (source start file, name, description, authors, manual section).
  105. man_pages = [
  106. (master_doc, 'AdafruitBlinkalibrary', u'Adafruit Blinka Library Documentation',
  107. [author], 1)
  108. ]
  109. # -- Options for Texinfo output -------------------------------------------
  110. # Grouping the document tree into Texinfo files. List of tuples
  111. # (source start file, target name, title, author,
  112. # dir menu entry, description, category)
  113. texinfo_documents = [
  114. (master_doc, 'AdafruitBlinkaLibrary', u'Adafruit Blinka Library Documentation',
  115. author, 'AdafruitBlinkaLibrary', 'One line description of project.',
  116. 'Miscellaneous'),
  117. ]