conf.py 5.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196
  1. #!/usr/bin/env python3
  2. # -*- coding: utf-8 -*-
  3. #
  4. # flake8: noqa
  5. #
  6. # importlib_metadata documentation build configuration file, created by
  7. # sphinx-quickstart on Thu Nov 30 10:21:00 2017.
  8. #
  9. # This file is execfile()d with the current directory set to its
  10. # containing dir.
  11. #
  12. # Note that not all possible configuration values are present in this
  13. # autogenerated file.
  14. #
  15. # All configuration values have a default; values that are commented out
  16. # serve to show the default.
  17. # If extensions (or modules to document with autodoc) are in another directory,
  18. # add these directories to sys.path here. If the directory is relative to the
  19. # documentation root, use os.path.abspath to make it absolute, like shown here.
  20. #
  21. # import os
  22. # import sys
  23. # sys.path.insert(0, os.path.abspath('.'))
  24. # -- General configuration ------------------------------------------------
  25. # If your documentation needs a minimal Sphinx version, state it here.
  26. #
  27. # needs_sphinx = '1.0'
  28. # Add any Sphinx extension module names here, as strings. They can be
  29. # extensions coming with Sphinx (named 'sphinx.ext.*') or your custom
  30. # ones.
  31. extensions = [
  32. 'rst.linker',
  33. 'sphinx.ext.autodoc',
  34. 'sphinx.ext.coverage',
  35. 'sphinx.ext.doctest',
  36. 'sphinx.ext.intersphinx',
  37. 'sphinx.ext.viewcode',
  38. ]
  39. # Add any paths that contain templates here, relative to this directory.
  40. templates_path = ['_templates']
  41. # The suffix(es) of source filenames.
  42. # You can specify multiple suffix as a list of string:
  43. #
  44. # source_suffix = ['.rst', '.md']
  45. source_suffix = '.rst'
  46. # The master toctree document.
  47. master_doc = 'index'
  48. # General information about the project.
  49. project = 'importlib_metadata'
  50. copyright = '2017-2018, Jason Coombs, Barry Warsaw'
  51. author = 'Jason Coombs, Barry Warsaw'
  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. # The short X.Y version.
  57. version = '0.1'
  58. # The full version, including alpha/beta/rc tags.
  59. release = '0.1'
  60. # The language for content autogenerated by Sphinx. Refer to documentation
  61. # for a list of supported languages.
  62. #
  63. # This is also used if you do content translation via gettext catalogs.
  64. # Usually you set "language" from the command line for these cases.
  65. language = None
  66. # List of patterns, relative to source directory, that match files and
  67. # directories to ignore when looking for source files.
  68. # This patterns also effect to html_static_path and html_extra_path
  69. exclude_patterns = ['_build', 'Thumbs.db', '.DS_Store']
  70. # The name of the Pygments (syntax highlighting) style to use.
  71. pygments_style = 'sphinx'
  72. # If true, `todo` and `todoList` produce output, else they produce nothing.
  73. todo_include_todos = False
  74. # -- Options for HTML output ----------------------------------------------
  75. # The theme to use for HTML and HTML Help pages. See the documentation for
  76. # a list of builtin themes.
  77. #
  78. html_theme = 'default'
  79. # Theme options are theme-specific and customize the look and feel of a theme
  80. # further. For a list of options available for each theme, see the
  81. # documentation.
  82. #
  83. # html_theme_options = {}
  84. # Add any paths that contain custom static files (such as style sheets) here,
  85. # relative to this directory. They are copied after the builtin static files,
  86. # so a file named "default.css" will overwrite the builtin "default.css".
  87. html_static_path = ['_static']
  88. # Custom sidebar templates, must be a dictionary that maps document names
  89. # to template names.
  90. #
  91. # This is required for the alabaster theme
  92. # refs: http://alabaster.readthedocs.io/en/latest/installation.html#sidebars
  93. html_sidebars = {
  94. '**': [
  95. 'relations.html', # needs 'show_related': True theme option to display
  96. 'searchbox.html',
  97. ]
  98. }
  99. # -- Options for HTMLHelp output ------------------------------------------
  100. # Output file base name for HTML help builder.
  101. htmlhelp_basename = 'importlib_metadatadoc'
  102. # -- Options for LaTeX output ---------------------------------------------
  103. latex_elements = {
  104. # The paper size ('letterpaper' or 'a4paper').
  105. #
  106. # 'papersize': 'letterpaper',
  107. # The font size ('10pt', '11pt' or '12pt').
  108. #
  109. # 'pointsize': '10pt',
  110. # Additional stuff for the LaTeX preamble.
  111. #
  112. # 'preamble': '',
  113. # Latex figure (float) alignment
  114. #
  115. # 'figure_align': 'htbp',
  116. }
  117. # Grouping the document tree into LaTeX files. List of tuples
  118. # (source start file, target name, title,
  119. # author, documentclass [howto, manual, or own class]).
  120. latex_documents = [
  121. (master_doc, 'importlib_metadata.tex', 'importlib\\_metadata Documentation',
  122. 'Brett Cannon, Barry Warsaw', 'manual'),
  123. ]
  124. # -- Options for manual page output ---------------------------------------
  125. # One entry per manual page. List of tuples
  126. # (source start file, name, description, authors, manual section).
  127. man_pages = [
  128. (master_doc, 'importlib_metadata', 'importlib_metadata Documentation',
  129. [author], 1)
  130. ]
  131. # -- Options for Texinfo output -------------------------------------------
  132. # Grouping the document tree into Texinfo files. List of tuples
  133. # (source start file, target name, title, author,
  134. # dir menu entry, description, category)
  135. texinfo_documents = [
  136. (master_doc, 'importlib_metadata', 'importlib_metadata Documentation',
  137. author, 'importlib_metadata', 'One line description of project.',
  138. 'Miscellaneous'),
  139. ]
  140. # Example configuration for intersphinx: refer to the Python standard library.
  141. intersphinx_mapping = {
  142. 'python': ('https://docs.python.org/3', None),
  143. }
  144. # For rst.linker, inject release dates into changelog.rst
  145. link_files = {
  146. 'changelog.rst': dict(
  147. replace=[
  148. dict(
  149. pattern=r'^(?m)((?P<scm_version>v?\d+(\.\d+){1,2}))\n[-=]+\n',
  150. with_scm='{text}\n{rev[timestamp]:%Y-%m-%d}\n\n',
  151. ),
  152. ],
  153. ),
  154. }