conf.py 6.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192
  1. # -*- coding: utf-8 -*-
  2. # This file is dual licensed under the terms of the Apache License, Version
  3. # 2.0, and the BSD License. See the LICENSE file in the root of this repository
  4. # for complete details.
  5. #
  6. # Cryptography documentation build configuration file, created by
  7. # sphinx-quickstart on Tue Aug 6 19:19:14 2013.
  8. #
  9. # This file is execfile()d with the current directory set to its containing dir
  10. #
  11. # Note that not all possible configuration values are present in this
  12. # autogenerated file.
  13. #
  14. # All configuration values have a default; values that are commented out
  15. # serve to show the default.
  16. from __future__ import absolute_import, division, print_function
  17. import os
  18. import sys
  19. try:
  20. import sphinx_rtd_theme
  21. except ImportError:
  22. sphinx_rtd_theme = None
  23. try:
  24. from sphinxcontrib import spelling
  25. except ImportError:
  26. spelling = None
  27. # If extensions (or modules to document with autodoc) are in another directory,
  28. # add these directories to sys.path here. If the directory is relative to the
  29. # documentation root, use os.path.abspath to make it absolute, like shown here.
  30. sys.path.insert(0, os.path.abspath('.'))
  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 ones.
  36. extensions = [
  37. 'sphinx.ext.autodoc',
  38. 'sphinx.ext.doctest',
  39. 'sphinx.ext.intersphinx',
  40. 'sphinx.ext.viewcode',
  41. 'cryptography-docs',
  42. ]
  43. if spelling is not None:
  44. extensions.append('sphinxcontrib.spelling')
  45. # Add any paths that contain templates here, relative to this directory.
  46. templates_path = ['_templates']
  47. nitpicky = True
  48. # The suffix of source filenames.
  49. source_suffix = '.rst'
  50. # The encoding of source files.
  51. # source_encoding = 'utf-8-sig'
  52. # The master toctree document.
  53. master_doc = 'index'
  54. # General information about the project.
  55. project = 'Cryptography'
  56. copyright = '2013-2017, Individual Contributors'
  57. # The version info for the project you're documenting, acts as replacement for
  58. # |version| and |release|, also used in various other places throughout the
  59. # built documents.
  60. #
  61. base_dir = os.path.join(os.path.dirname(__file__), os.pardir)
  62. about = {}
  63. with open(os.path.join(base_dir, "src", "cryptography", "__about__.py")) as f:
  64. exec(f.read(), about)
  65. version = release = about["__version__"]
  66. # The language for content autogenerated by Sphinx. Refer to documentation
  67. # for a list of supported languages.
  68. # language = None
  69. # There are two options for replacing |today|: either, you set today to some
  70. # non-false value, then it is used:
  71. # today = ''
  72. # Else, today_fmt is used as the format for a strftime call.
  73. # today_fmt = '%B %d, %Y'
  74. # List of patterns, relative to source directory, that match files and
  75. # directories to ignore when looking for source files.
  76. exclude_patterns = ['_build']
  77. # The reST default role (used for this markup: `text`) to use for all documents
  78. # default_role = None
  79. # If true, '()' will be appended to :func: etc. cross-reference text.
  80. # add_function_parentheses = True
  81. # If true, the current module name will be prepended to all description
  82. # unit titles (such as .. function::).
  83. # add_module_names = True
  84. # If true, sectionauthor and moduleauthor directives will be shown in the
  85. # output. They are ignored by default.
  86. # show_authors = False
  87. # The name of the Pygments (syntax highlighting) style to use.
  88. pygments_style = 'sphinx'
  89. # -- Options for HTML output --------------------------------------------------
  90. # The theme to use for HTML and HTML Help pages. See the documentation for
  91. # a list of builtin themes.
  92. if sphinx_rtd_theme:
  93. html_theme = "sphinx_rtd_theme"
  94. html_theme_path = [sphinx_rtd_theme.get_html_theme_path()]
  95. else:
  96. html_theme = "default"
  97. # Add any paths that contain custom static files (such as style sheets) here,
  98. # relative to this directory. They are copied after the builtin static files,
  99. # so a file named "default.css" will overwrite the builtin "default.css".
  100. html_static_path = ['_static']
  101. # Output file base name for HTML help builder.
  102. htmlhelp_basename = 'Cryptographydoc'
  103. # -- Options for LaTeX output -------------------------------------------------
  104. latex_elements = {
  105. }
  106. # Grouping the document tree into LaTeX files. List of tuples
  107. # (source start file, target name, title, author, documentclass [howto/manual])
  108. latex_documents = [
  109. ('index', 'Cryptography.tex', 'Cryptography Documentation',
  110. 'Individual Contributors', 'manual'),
  111. ]
  112. # -- Options for manual page output -------------------------------------------
  113. # One entry per manual page. List of tuples
  114. # (source start file, name, description, authors, manual section).
  115. man_pages = [
  116. ('index', 'cryptography', 'Cryptography Documentation',
  117. ['Individual Contributors'], 1)
  118. ]
  119. # -- Options for Texinfo output -----------------------------------------------
  120. # Grouping the document tree into Texinfo files. List of tuples
  121. # (source start file, target name, title, author,
  122. # dir menu entry, description, category)
  123. texinfo_documents = [
  124. ('index', 'Cryptography', 'Cryptography Documentation',
  125. 'Individual Contributors', 'Cryptography',
  126. 'One line description of project.',
  127. 'Miscellaneous'),
  128. ]
  129. # Example configuration for intersphinx: refer to the Python standard library.
  130. intersphinx_mapping = {'https://docs.python.org/3': None}
  131. epub_theme = 'epub'
  132. # Retry requests in the linkcheck builder so that we're resillient against
  133. # transient network errors.
  134. linkcheck_retries = 10
  135. linkcheck_timeout = 5
  136. linkcheck_ignore = [
  137. # Small DH key results in a TLS failure on modern OpenSSL
  138. r"https://info.isl.ntt.co.jp/crypt/eng/camellia/",
  139. # Inconsistent small DH params they seem incapable of fixing
  140. r"https://www.secg.org/sec1-v2.pdf",
  141. # 403ing from Travis
  142. r"https://devblogs.microsoft.com/oldnewthing/\?p=4223",
  143. # Incomplete cert chain
  144. r"https://cveform.mitre.org/",
  145. ]