Alex Gaynor | c62e91f | 2013-08-06 19:25:52 -0700 | [diff] [blame] | 1 | # -*- coding: utf-8 -*- |
Alex Gaynor | c37feed | 2014-03-08 08:32:56 -0800 | [diff] [blame] | 2 | |
Alex Gaynor | 5951f46 | 2014-11-16 09:08:42 -0800 | [diff] [blame] | 3 | # This file is dual licensed under the terms of the Apache License, Version |
| 4 | # 2.0, and the BSD License. See the LICENSE file in the root of this repository |
| 5 | # for complete details. |
Alex Gaynor | c37feed | 2014-03-08 08:32:56 -0800 | [diff] [blame] | 6 | |
Alex Gaynor | c62e91f | 2013-08-06 19:25:52 -0700 | [diff] [blame] | 7 | # |
| 8 | # Cryptography documentation build configuration file, created by |
| 9 | # sphinx-quickstart on Tue Aug 6 19:19:14 2013. |
| 10 | # |
Alex Gaynor | d21da67 | 2013-08-07 08:12:16 -0700 | [diff] [blame] | 11 | # This file is execfile()d with the current directory set to its containing dir |
Alex Gaynor | c62e91f | 2013-08-06 19:25:52 -0700 | [diff] [blame] | 12 | # |
| 13 | # Note that not all possible configuration values are present in this |
| 14 | # autogenerated file. |
| 15 | # |
| 16 | # All configuration values have a default; values that are commented out |
| 17 | # serve to show the default. |
| 18 | |
Alex Gaynor | c37feed | 2014-03-08 08:32:56 -0800 | [diff] [blame] | 19 | from __future__ import absolute_import, division, print_function |
| 20 | |
Alex Gaynor | af82d5e | 2013-10-29 17:07:24 -0700 | [diff] [blame] | 21 | import os |
| 22 | import sys |
| 23 | |
Alex Gaynor | 27283cf | 2013-11-08 10:49:22 -0800 | [diff] [blame] | 24 | try: |
| 25 | import sphinx_rtd_theme |
| 26 | except ImportError: |
| 27 | sphinx_rtd_theme = None |
| 28 | |
Alex Gaynor | eb656bd | 2014-01-16 14:43:37 -0600 | [diff] [blame] | 29 | try: |
| 30 | from sphinxcontrib import spelling |
| 31 | except ImportError: |
| 32 | spelling = None |
| 33 | |
Alex Gaynor | 27283cf | 2013-11-08 10:49:22 -0800 | [diff] [blame] | 34 | |
Alex Gaynor | c62e91f | 2013-08-06 19:25:52 -0700 | [diff] [blame] | 35 | # If extensions (or modules to document with autodoc) are in another directory, |
| 36 | # add these directories to sys.path here. If the directory is relative to the |
| 37 | # documentation root, use os.path.abspath to make it absolute, like shown here. |
Lucia Li | c6ba99d | 2021-11-08 22:06:11 +0800 | [diff] [blame^] | 38 | sys.path.insert(0, os.path.abspath(".")) |
Alex Gaynor | c62e91f | 2013-08-06 19:25:52 -0700 | [diff] [blame] | 39 | |
Alex Gaynor | d21da67 | 2013-08-07 08:12:16 -0700 | [diff] [blame] | 40 | # -- General configuration ---------------------------------------------------- |
Alex Gaynor | c62e91f | 2013-08-06 19:25:52 -0700 | [diff] [blame] | 41 | |
| 42 | # If your documentation needs a minimal Sphinx version, state it here. |
Alex Gaynor | ffcf3b1 | 2014-03-26 13:10:10 -0700 | [diff] [blame] | 43 | # needs_sphinx = '1.0' |
Alex Gaynor | c62e91f | 2013-08-06 19:25:52 -0700 | [diff] [blame] | 44 | |
Alex Gaynor | d21da67 | 2013-08-07 08:12:16 -0700 | [diff] [blame] | 45 | # Add any Sphinx extension module names here, as strings. They can be |
| 46 | # extensions coming with Sphinx (named 'sphinx.ext.*') or your custom ones. |
| 47 | extensions = [ |
Lucia Li | c6ba99d | 2021-11-08 22:06:11 +0800 | [diff] [blame^] | 48 | "sphinx.ext.autodoc", |
| 49 | "sphinx.ext.doctest", |
| 50 | "sphinx.ext.intersphinx", |
| 51 | "sphinx.ext.viewcode", |
| 52 | "cryptography-docs", |
Alex Gaynor | d21da67 | 2013-08-07 08:12:16 -0700 | [diff] [blame] | 53 | ] |
Alex Gaynor | c62e91f | 2013-08-06 19:25:52 -0700 | [diff] [blame] | 54 | |
Alex Gaynor | eb656bd | 2014-01-16 14:43:37 -0600 | [diff] [blame] | 55 | if spelling is not None: |
Lucia Li | c6ba99d | 2021-11-08 22:06:11 +0800 | [diff] [blame^] | 56 | extensions.append("sphinxcontrib.spelling") |
Alex Gaynor | eb656bd | 2014-01-16 14:43:37 -0600 | [diff] [blame] | 57 | |
Alex Gaynor | c62e91f | 2013-08-06 19:25:52 -0700 | [diff] [blame] | 58 | # Add any paths that contain templates here, relative to this directory. |
Lucia Li | c6ba99d | 2021-11-08 22:06:11 +0800 | [diff] [blame^] | 59 | templates_path = ["_templates"] |
Alex Gaynor | c62e91f | 2013-08-06 19:25:52 -0700 | [diff] [blame] | 60 | |
Paul Kehrer | 45efdbc | 2015-02-12 10:58:22 -0600 | [diff] [blame] | 61 | nitpicky = True |
| 62 | |
Alex Gaynor | c62e91f | 2013-08-06 19:25:52 -0700 | [diff] [blame] | 63 | # The suffix of source filenames. |
Lucia Li | c6ba99d | 2021-11-08 22:06:11 +0800 | [diff] [blame^] | 64 | source_suffix = ".rst" |
Alex Gaynor | c62e91f | 2013-08-06 19:25:52 -0700 | [diff] [blame] | 65 | |
| 66 | # The encoding of source files. |
Alex Gaynor | ffcf3b1 | 2014-03-26 13:10:10 -0700 | [diff] [blame] | 67 | # source_encoding = 'utf-8-sig' |
Alex Gaynor | c62e91f | 2013-08-06 19:25:52 -0700 | [diff] [blame] | 68 | |
| 69 | # The master toctree document. |
Lucia Li | c6ba99d | 2021-11-08 22:06:11 +0800 | [diff] [blame^] | 70 | master_doc = "index" |
Alex Gaynor | c62e91f | 2013-08-06 19:25:52 -0700 | [diff] [blame] | 71 | |
| 72 | # General information about the project. |
Lucia Li | c6ba99d | 2021-11-08 22:06:11 +0800 | [diff] [blame^] | 73 | project = "Cryptography" |
| 74 | copyright = "2013-2021, Individual Contributors" |
Alex Gaynor | c62e91f | 2013-08-06 19:25:52 -0700 | [diff] [blame] | 75 | |
| 76 | # The version info for the project you're documenting, acts as replacement for |
| 77 | # |version| and |release|, also used in various other places throughout the |
| 78 | # built documents. |
| 79 | # |
Alex Gaynor | 2b22fae | 2014-01-06 13:19:33 -0800 | [diff] [blame] | 80 | |
| 81 | base_dir = os.path.join(os.path.dirname(__file__), os.pardir) |
| 82 | about = {} |
Donald Stufft | c62a78c | 2014-11-07 19:17:08 -0500 | [diff] [blame] | 83 | with open(os.path.join(base_dir, "src", "cryptography", "__about__.py")) as f: |
Lucia Li | c6ba99d | 2021-11-08 22:06:11 +0800 | [diff] [blame^] | 84 | exec (f.read(), about) |
Alex Gaynor | 2b22fae | 2014-01-06 13:19:33 -0800 | [diff] [blame] | 85 | |
| 86 | version = release = about["__version__"] |
Alex Gaynor | c62e91f | 2013-08-06 19:25:52 -0700 | [diff] [blame] | 87 | |
| 88 | # The language for content autogenerated by Sphinx. Refer to documentation |
| 89 | # for a list of supported languages. |
Alex Gaynor | ffcf3b1 | 2014-03-26 13:10:10 -0700 | [diff] [blame] | 90 | # language = None |
Alex Gaynor | c62e91f | 2013-08-06 19:25:52 -0700 | [diff] [blame] | 91 | |
| 92 | # There are two options for replacing |today|: either, you set today to some |
| 93 | # non-false value, then it is used: |
Alex Gaynor | ffcf3b1 | 2014-03-26 13:10:10 -0700 | [diff] [blame] | 94 | # today = '' |
Alex Gaynor | c62e91f | 2013-08-06 19:25:52 -0700 | [diff] [blame] | 95 | # Else, today_fmt is used as the format for a strftime call. |
Alex Gaynor | ffcf3b1 | 2014-03-26 13:10:10 -0700 | [diff] [blame] | 96 | # today_fmt = '%B %d, %Y' |
Alex Gaynor | c62e91f | 2013-08-06 19:25:52 -0700 | [diff] [blame] | 97 | |
| 98 | # List of patterns, relative to source directory, that match files and |
| 99 | # directories to ignore when looking for source files. |
Lucia Li | c6ba99d | 2021-11-08 22:06:11 +0800 | [diff] [blame^] | 100 | exclude_patterns = ["_build"] |
Alex Gaynor | c62e91f | 2013-08-06 19:25:52 -0700 | [diff] [blame] | 101 | |
Alex Gaynor | d21da67 | 2013-08-07 08:12:16 -0700 | [diff] [blame] | 102 | # The reST default role (used for this markup: `text`) to use for all documents |
Alex Gaynor | ffcf3b1 | 2014-03-26 13:10:10 -0700 | [diff] [blame] | 103 | # default_role = None |
Alex Gaynor | c62e91f | 2013-08-06 19:25:52 -0700 | [diff] [blame] | 104 | |
| 105 | # If true, '()' will be appended to :func: etc. cross-reference text. |
Alex Gaynor | ffcf3b1 | 2014-03-26 13:10:10 -0700 | [diff] [blame] | 106 | # add_function_parentheses = True |
Alex Gaynor | c62e91f | 2013-08-06 19:25:52 -0700 | [diff] [blame] | 107 | |
| 108 | # If true, the current module name will be prepended to all description |
| 109 | # unit titles (such as .. function::). |
Alex Gaynor | ffcf3b1 | 2014-03-26 13:10:10 -0700 | [diff] [blame] | 110 | # add_module_names = True |
Alex Gaynor | c62e91f | 2013-08-06 19:25:52 -0700 | [diff] [blame] | 111 | |
| 112 | # If true, sectionauthor and moduleauthor directives will be shown in the |
| 113 | # output. They are ignored by default. |
Alex Gaynor | ffcf3b1 | 2014-03-26 13:10:10 -0700 | [diff] [blame] | 114 | # show_authors = False |
Alex Gaynor | c62e91f | 2013-08-06 19:25:52 -0700 | [diff] [blame] | 115 | |
| 116 | # The name of the Pygments (syntax highlighting) style to use. |
Lucia Li | c6ba99d | 2021-11-08 22:06:11 +0800 | [diff] [blame^] | 117 | pygments_style = "sphinx" |
Alex Gaynor | c62e91f | 2013-08-06 19:25:52 -0700 | [diff] [blame] | 118 | |
Alex Gaynor | d21da67 | 2013-08-07 08:12:16 -0700 | [diff] [blame] | 119 | # -- Options for HTML output -------------------------------------------------- |
Alex Gaynor | c62e91f | 2013-08-06 19:25:52 -0700 | [diff] [blame] | 120 | |
| 121 | # The theme to use for HTML and HTML Help pages. See the documentation for |
| 122 | # a list of builtin themes. |
Alex Gaynor | 27283cf | 2013-11-08 10:49:22 -0800 | [diff] [blame] | 123 | |
| 124 | if sphinx_rtd_theme: |
| 125 | html_theme = "sphinx_rtd_theme" |
| 126 | html_theme_path = [sphinx_rtd_theme.get_html_theme_path()] |
| 127 | else: |
| 128 | html_theme = "default" |
Alex Gaynor | c62e91f | 2013-08-06 19:25:52 -0700 | [diff] [blame] | 129 | |
Alex Gaynor | c62e91f | 2013-08-06 19:25:52 -0700 | [diff] [blame] | 130 | # Add any paths that contain custom static files (such as style sheets) here, |
| 131 | # relative to this directory. They are copied after the builtin static files, |
| 132 | # so a file named "default.css" will overwrite the builtin "default.css". |
Lucia Li | c6ba99d | 2021-11-08 22:06:11 +0800 | [diff] [blame^] | 133 | html_static_path = ["_static"] |
Alex Gaynor | c62e91f | 2013-08-06 19:25:52 -0700 | [diff] [blame] | 134 | |
Alex Gaynor | c62e91f | 2013-08-06 19:25:52 -0700 | [diff] [blame] | 135 | # Output file base name for HTML help builder. |
Lucia Li | c6ba99d | 2021-11-08 22:06:11 +0800 | [diff] [blame^] | 136 | htmlhelp_basename = "Cryptographydoc" |
Alex Gaynor | c62e91f | 2013-08-06 19:25:52 -0700 | [diff] [blame] | 137 | |
| 138 | |
Alex Gaynor | d21da67 | 2013-08-07 08:12:16 -0700 | [diff] [blame] | 139 | # -- Options for LaTeX output ------------------------------------------------- |
Alex Gaynor | c62e91f | 2013-08-06 19:25:52 -0700 | [diff] [blame] | 140 | |
Lucia Li | c6ba99d | 2021-11-08 22:06:11 +0800 | [diff] [blame^] | 141 | latex_elements = {} |
Alex Gaynor | c62e91f | 2013-08-06 19:25:52 -0700 | [diff] [blame] | 142 | |
| 143 | # Grouping the document tree into LaTeX files. List of tuples |
Alex Gaynor | d21da67 | 2013-08-07 08:12:16 -0700 | [diff] [blame] | 144 | # (source start file, target name, title, author, documentclass [howto/manual]) |
Alex Gaynor | c62e91f | 2013-08-06 19:25:52 -0700 | [diff] [blame] | 145 | latex_documents = [ |
Lucia Li | c6ba99d | 2021-11-08 22:06:11 +0800 | [diff] [blame^] | 146 | ( |
| 147 | "index", |
| 148 | "Cryptography.tex", |
| 149 | "Cryptography Documentation", |
| 150 | "Individual Contributors", |
| 151 | "manual", |
| 152 | ), |
Alex Gaynor | c62e91f | 2013-08-06 19:25:52 -0700 | [diff] [blame] | 153 | ] |
| 154 | |
Alex Gaynor | d21da67 | 2013-08-07 08:12:16 -0700 | [diff] [blame] | 155 | # -- Options for manual page output ------------------------------------------- |
Alex Gaynor | c62e91f | 2013-08-06 19:25:52 -0700 | [diff] [blame] | 156 | |
| 157 | # One entry per manual page. List of tuples |
| 158 | # (source start file, name, description, authors, manual section). |
| 159 | man_pages = [ |
Lucia Li | c6ba99d | 2021-11-08 22:06:11 +0800 | [diff] [blame^] | 160 | ( |
| 161 | "index", |
| 162 | "cryptography", |
| 163 | "Cryptography Documentation", |
| 164 | ["Individual Contributors"], |
| 165 | 1, |
| 166 | ) |
Alex Gaynor | c62e91f | 2013-08-06 19:25:52 -0700 | [diff] [blame] | 167 | ] |
| 168 | |
Alex Gaynor | d21da67 | 2013-08-07 08:12:16 -0700 | [diff] [blame] | 169 | # -- Options for Texinfo output ----------------------------------------------- |
Alex Gaynor | c62e91f | 2013-08-06 19:25:52 -0700 | [diff] [blame] | 170 | |
| 171 | # Grouping the document tree into Texinfo files. List of tuples |
| 172 | # (source start file, target name, title, author, |
| 173 | # dir menu entry, description, category) |
| 174 | texinfo_documents = [ |
Lucia Li | c6ba99d | 2021-11-08 22:06:11 +0800 | [diff] [blame^] | 175 | ( |
| 176 | "index", |
| 177 | "Cryptography", |
| 178 | "Cryptography Documentation", |
| 179 | "Individual Contributors", |
| 180 | "Cryptography", |
| 181 | "One line description of project.", |
| 182 | "Miscellaneous", |
| 183 | ), |
Alex Gaynor | c62e91f | 2013-08-06 19:25:52 -0700 | [diff] [blame] | 184 | ] |
| 185 | |
Alex Gaynor | c62e91f | 2013-08-06 19:25:52 -0700 | [diff] [blame] | 186 | # Example configuration for intersphinx: refer to the Python standard library. |
Lucia Li | c6ba99d | 2021-11-08 22:06:11 +0800 | [diff] [blame^] | 187 | intersphinx_mapping = {"https://docs.python.org/3": None} |
David Reid | dd97bfe | 2014-01-16 19:46:22 -0800 | [diff] [blame] | 188 | |
Lucia Li | c6ba99d | 2021-11-08 22:06:11 +0800 | [diff] [blame^] | 189 | epub_theme = "epub" |
Alex Gaynor | 357f977 | 2016-02-13 09:58:38 -0500 | [diff] [blame] | 190 | |
| 191 | # Retry requests in the linkcheck builder so that we're resillient against |
| 192 | # transient network errors. |
Alex Gaynor | d7c0c14 | 2019-01-17 21:32:08 -0500 | [diff] [blame] | 193 | linkcheck_retries = 10 |
Alex Gaynor | aef8ebc | 2017-05-29 00:12:30 -0400 | [diff] [blame] | 194 | |
Lucia Li | c6ba99d | 2021-11-08 22:06:11 +0800 | [diff] [blame^] | 195 | linkcheck_timeout = 5 |
| 196 | |
Alex Gaynor | aef8ebc | 2017-05-29 00:12:30 -0400 | [diff] [blame] | 197 | linkcheck_ignore = [ |
Alex Gaynor | 84f6c1b | 2018-10-29 23:18:41 -0400 | [diff] [blame] | 198 | # Small DH key results in a TLS failure on modern OpenSSL |
Lucia Li | c6ba99d | 2021-11-08 22:06:11 +0800 | [diff] [blame^] | 199 | r"https://info.isl.ntt.co.jp/crypt/eng/camellia/", |
| 200 | # Inconsistent small DH params they seem incapable of fixing |
| 201 | r"https://www.secg.org/sec1-v2.pdf", |
Alex Gaynor | aef8ebc | 2017-05-29 00:12:30 -0400 | [diff] [blame] | 202 | ] |