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.

151 lines
4.9 KiB

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