conf.py 9.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298
  1. # -*- coding: utf-8 -*-
  2. #
  3. # Read the Docs Template documentation build configuration file, created by
  4. # sphinx-quickstart on Tue Aug 26 14:19:49 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. import sys, os
  15. import re
  16. from subprocess import call, Popen, PIPE
  17. import shlex
  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('.'))
  22. from repo_util import run_cmd_get_output
  23. # Call Doxygen to get XML files from the header files
  24. print "Calling Doxygen to generate latest XML files"
  25. call('doxygen')
  26. # Generate 'api_name.inc' files using the XML files by Doxygen
  27. os.system("python gen-dxd.py")
  28. # http://stackoverflow.com/questions/12772927/specifying-an-online-image-in-sphinx-restructuredtext-format
  29. #
  30. suppress_warnings = ['image.nonlocal_uri']
  31. # -- General configuration ------------------------------------------------
  32. # If your documentation needs a minimal Sphinx version, state it here.
  33. #needs_sphinx = '1.0'
  34. # Add any Sphinx extension module names here, as strings. They can be
  35. # extensions coming with Sphinx (named 'sphinx.ext.*') or your custom
  36. # ones.
  37. extensions = ['breathe', 'link-roles' ]
  38. # Breathe extension variables
  39. breathe_projects = { "epaper-29-ws": "xml/" }
  40. breathe_default_project = "epaper-29-ws"
  41. # Add any paths that contain templates here, relative to this directory.
  42. templates_path = ['_templates']
  43. # The suffix of source filenames.
  44. source_suffix = '.rst'
  45. # The encoding of source files.
  46. #source_encoding = 'utf-8-sig'
  47. # The master toctree document.
  48. master_doc = 'index'
  49. # General information about the project.
  50. project = u'epaper-29-ws'
  51. copyright = u'2016 - 2017, Espressif'
  52. # The version info for the project you're documenting, acts as replacement for
  53. # |version| and |release|, also used in various other places throughout the
  54. # built documents.
  55. #
  56. # Readthedocs largely ignores 'version' and 'release', and displays one of
  57. # 'latest', tag name, or branch name, depending on the build type.
  58. # Still, this is useful for non-RTD builds.
  59. # This is supposed to be "the short X.Y version", but it's the only version
  60. # visible when you open index.html.
  61. # Display full version to make things less confusing.
  62. version = run_cmd_get_output('git describe')
  63. # The full version, including alpha/beta/rc tags.
  64. # If needed, nearest tag is returned by 'git describe --abbrev=0'.
  65. release = version
  66. print 'Version: {0} Release: {1}'.format(version, release)
  67. # The language for content autogenerated by Sphinx. Refer to documentation
  68. # for a list of supported languages.
  69. #language = None
  70. # There are two options for replacing |today|: either, you set today to some
  71. # non-false value, then it is used:
  72. #today = ''
  73. # Else, today_fmt is used as the format for a strftime call.
  74. #today_fmt = '%B %d, %Y'
  75. # List of patterns, relative to source directory, that match files and
  76. # directories to ignore when looking for source files.
  77. exclude_patterns = ['_build']
  78. # The reST default role (used for this markup: `text`) to use for all
  79. # documents.
  80. #default_role = None
  81. # If true, '()' will be appended to :func: etc. cross-reference text.
  82. #add_function_parentheses = True
  83. # If true, the current module name will be prepended to all description
  84. # unit titles (such as .. function::).
  85. #add_module_names = True
  86. # If true, sectionauthor and moduleauthor directives will be shown in the
  87. # output. They are ignored by default.
  88. #show_authors = False
  89. # The name of the Pygments (syntax highlighting) style to use.
  90. pygments_style = 'sphinx'
  91. # A list of ignored prefixes for module index sorting.
  92. #modindex_common_prefix = []
  93. # If true, keep warnings as "system message" paragraphs in the built documents.
  94. #keep_warnings = False
  95. # -- Options for HTML output ----------------------------------------------
  96. # The theme to use for HTML and HTML Help pages. See the documentation for
  97. # a list of builtin themes.
  98. html_theme = 'default'
  99. # Theme options are theme-specific and customize the look and feel of a theme
  100. # further. For a list of options available for each theme, see the
  101. # documentation.
  102. #html_theme_options = {}
  103. # Add any paths that contain custom themes here, relative to this directory.
  104. #html_theme_path = []
  105. # The name for this set of Sphinx documents. If None, it defaults to
  106. # "<project> v<release> documentation".
  107. #html_title = None
  108. # A shorter title for the navigation bar. Default is the same as html_title.
  109. #html_short_title = None
  110. # The name of an image file (relative to this directory) to place at the top
  111. # of the sidebar.
  112. #html_logo = None
  113. # The name of an image file (within the static path) to use as favicon of the
  114. # docs. This file should be a Windows icon file (.ico) being 16x16 or 32x32
  115. # pixels large.
  116. #html_favicon = None
  117. # Add any paths that contain custom static files (such as style sheets) here,
  118. # relative to this directory. They are copied after the builtin static files,
  119. # so a file named "default.css" will overwrite the builtin "default.css".
  120. html_static_path = []
  121. # Add any extra paths that contain custom files (such as robots.txt or
  122. # .htaccess) here, relative to this directory. These files are copied
  123. # directly to the root of the documentation.
  124. #html_extra_path = []
  125. # If not '', a 'Last updated on:' timestamp is inserted at every page bottom,
  126. # using the given strftime format.
  127. #html_last_updated_fmt = '%b %d, %Y'
  128. # If true, SmartyPants will be used to convert quotes and dashes to
  129. # typographically correct entities.
  130. #html_use_smartypants = True
  131. # Custom sidebar templates, maps document names to template names.
  132. #html_sidebars = {}
  133. # Additional templates that should be rendered to pages, maps page names to
  134. # template names.
  135. #html_additional_pages = {}
  136. # If false, no module index is generated.
  137. #html_domain_indices = True
  138. # If false, no index is generated.
  139. #html_use_index = True
  140. # If true, the index is split into individual pages for each letter.
  141. #html_split_index = False
  142. # If true, links to the reST sources are added to the pages.
  143. #html_show_sourcelink = True
  144. # If true, "Created using Sphinx" is shown in the HTML footer. Default is True.
  145. #html_show_sphinx = True
  146. # If true, "(C) Copyright ..." is shown in the HTML footer. Default is True.
  147. #html_show_copyright = True
  148. # If true, an OpenSearch description file will be output, and all pages will
  149. # contain a <link> tag referring to it. The value of this option must be the
  150. # base URL from which the finished HTML is served.
  151. #html_use_opensearch = ''
  152. # This is the file name suffix for HTML files (e.g. ".xhtml").
  153. #html_file_suffix = None
  154. # Output file base name for HTML help builder.
  155. htmlhelp_basename = 'ReadtheDocsTemplatedoc'
  156. # -- Options for LaTeX output ---------------------------------------------
  157. latex_elements = {
  158. # The paper size ('letterpaper' or 'a4paper').
  159. #'papersize': 'letterpaper',
  160. # The font size ('10pt', '11pt' or '12pt').
  161. #'pointsize': '10pt',
  162. # Additional stuff for the LaTeX preamble.
  163. #'preamble': '',
  164. }
  165. # Grouping the document tree into LaTeX files. List of tuples
  166. # (source start file, target name, title,
  167. # author, documentclass [howto, manual, or own class]).
  168. latex_documents = [
  169. ('index', 'ReadtheDocsTemplate.tex', u'Read the Docs Template Documentation',
  170. u'Read the Docs', 'manual'),
  171. ]
  172. # The name of an image file (relative to this directory) to place at the top of
  173. # the title page.
  174. #latex_logo = None
  175. # For "manual" documents, if this is true, then toplevel headings are parts,
  176. # not chapters.
  177. #latex_use_parts = False
  178. # If true, show page references after internal links.
  179. #latex_show_pagerefs = False
  180. # If true, show URL addresses after external links.
  181. #latex_show_urls = False
  182. # Documents to append as an appendix to all manuals.
  183. #latex_appendices = []
  184. # If false, no module index is generated.
  185. #latex_domain_indices = True
  186. # -- Options for manual page output ---------------------------------------
  187. # One entry per manual page. List of tuples
  188. # (source start file, name, description, authors, manual section).
  189. man_pages = [
  190. ('index', 'readthedocstemplate', u'Read the Docs Template Documentation',
  191. [u'Read the Docs'], 1)
  192. ]
  193. # If true, show URL addresses after external links.
  194. #man_show_urls = False
  195. # -- Options for Texinfo output -------------------------------------------
  196. # Grouping the document tree into Texinfo files. List of tuples
  197. # (source start file, target name, title, author,
  198. # dir menu entry, description, category)
  199. texinfo_documents = [
  200. ('index', 'ReadtheDocsTemplate', u'Read the Docs Template Documentation',
  201. u'Read the Docs', 'ReadtheDocsTemplate', 'One line description of project.',
  202. 'Miscellaneous'),
  203. ]
  204. # Documents to append as an appendix to all manuals.
  205. #texinfo_appendices = []
  206. # If false, no module index is generated.
  207. #texinfo_domain_indices = True
  208. # How to display URL addresses: 'footnote', 'no', or 'inline'.
  209. #texinfo_show_urls = 'footnote'
  210. # If true, do not generate a @detailmenu in the "Top" node's menu.
  211. #texinfo_no_detailmenu = False
  212. # -- Use sphinx_rtd_theme for local builds --------------------------------
  213. # ref. https://github.com/snide/sphinx_rtd_theme#using-this-theme-locally-then-building-on-read-the-docs
  214. #
  215. # on_rtd is whether we are on readthedocs.org
  216. on_rtd = os.environ.get('READTHEDOCS', None) == 'True'
  217. if not on_rtd: # only import and set the theme if we're building docs locally
  218. import sphinx_rtd_theme
  219. html_theme = 'sphinx_rtd_theme'
  220. html_theme_path = [sphinx_rtd_theme.get_html_theme_path()]
  221. # otherwise, readthedocs.org uses their theme by default, so no need to specify it