blob: fb67adabc905ddb283240085468a2b66a455b32e [file] [log] [blame]
Alex Gaynorc62e91f2013-08-06 19:25:52 -07001# -*- coding: utf-8 -*-
Alex Gaynorc37feed2014-03-08 08:32:56 -08002
Alex Gaynor5951f462014-11-16 09:08:42 -08003# 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 Gaynorc37feed2014-03-08 08:32:56 -08006
Alex Gaynorc62e91f2013-08-06 19:25:52 -07007#
8# Cryptography documentation build configuration file, created by
9# sphinx-quickstart on Tue Aug 6 19:19:14 2013.
10#
Alex Gaynord21da672013-08-07 08:12:16 -070011# This file is execfile()d with the current directory set to its containing dir
Alex Gaynorc62e91f2013-08-06 19:25:52 -070012#
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 Gaynorc37feed2014-03-08 08:32:56 -080019from __future__ import absolute_import, division, print_function
20
Alex Gaynoraf82d5e2013-10-29 17:07:24 -070021import os
22import sys
23
Alex Gaynor27283cf2013-11-08 10:49:22 -080024try:
25 import sphinx_rtd_theme
26except ImportError:
27 sphinx_rtd_theme = None
28
Alex Gaynoreb656bd2014-01-16 14:43:37 -060029try:
30 from sphinxcontrib import spelling
31except ImportError:
32 spelling = None
33
Alex Gaynor27283cf2013-11-08 10:49:22 -080034
Alex Gaynorc62e91f2013-08-06 19:25:52 -070035# 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 Lic6ba99d2021-11-08 22:06:11 +080038sys.path.insert(0, os.path.abspath("."))
Alex Gaynorc62e91f2013-08-06 19:25:52 -070039
Alex Gaynord21da672013-08-07 08:12:16 -070040# -- General configuration ----------------------------------------------------
Alex Gaynorc62e91f2013-08-06 19:25:52 -070041
42# If your documentation needs a minimal Sphinx version, state it here.
Alex Gaynorffcf3b12014-03-26 13:10:10 -070043# needs_sphinx = '1.0'
Alex Gaynorc62e91f2013-08-06 19:25:52 -070044
Alex Gaynord21da672013-08-07 08:12:16 -070045# Add any Sphinx extension module names here, as strings. They can be
46# extensions coming with Sphinx (named 'sphinx.ext.*') or your custom ones.
47extensions = [
Lucia Lic6ba99d2021-11-08 22:06:11 +080048 "sphinx.ext.autodoc",
49 "sphinx.ext.doctest",
50 "sphinx.ext.intersphinx",
51 "sphinx.ext.viewcode",
52 "cryptography-docs",
Alex Gaynord21da672013-08-07 08:12:16 -070053]
Alex Gaynorc62e91f2013-08-06 19:25:52 -070054
Alex Gaynoreb656bd2014-01-16 14:43:37 -060055if spelling is not None:
Lucia Lic6ba99d2021-11-08 22:06:11 +080056 extensions.append("sphinxcontrib.spelling")
Alex Gaynoreb656bd2014-01-16 14:43:37 -060057
Alex Gaynorc62e91f2013-08-06 19:25:52 -070058# Add any paths that contain templates here, relative to this directory.
Lucia Lic6ba99d2021-11-08 22:06:11 +080059templates_path = ["_templates"]
Alex Gaynorc62e91f2013-08-06 19:25:52 -070060
Paul Kehrer45efdbc2015-02-12 10:58:22 -060061nitpicky = True
62
Alex Gaynorc62e91f2013-08-06 19:25:52 -070063# The suffix of source filenames.
Lucia Lic6ba99d2021-11-08 22:06:11 +080064source_suffix = ".rst"
Alex Gaynorc62e91f2013-08-06 19:25:52 -070065
66# The encoding of source files.
Alex Gaynorffcf3b12014-03-26 13:10:10 -070067# source_encoding = 'utf-8-sig'
Alex Gaynorc62e91f2013-08-06 19:25:52 -070068
69# The master toctree document.
Lucia Lic6ba99d2021-11-08 22:06:11 +080070master_doc = "index"
Alex Gaynorc62e91f2013-08-06 19:25:52 -070071
72# General information about the project.
Lucia Lic6ba99d2021-11-08 22:06:11 +080073project = "Cryptography"
74copyright = "2013-2021, Individual Contributors"
Alex Gaynorc62e91f2013-08-06 19:25:52 -070075
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 Gaynor2b22fae2014-01-06 13:19:33 -080080
81base_dir = os.path.join(os.path.dirname(__file__), os.pardir)
82about = {}
Donald Stufftc62a78c2014-11-07 19:17:08 -050083with open(os.path.join(base_dir, "src", "cryptography", "__about__.py")) as f:
Lucia Lic6ba99d2021-11-08 22:06:11 +080084 exec (f.read(), about)
Alex Gaynor2b22fae2014-01-06 13:19:33 -080085
86version = release = about["__version__"]
Alex Gaynorc62e91f2013-08-06 19:25:52 -070087
88# The language for content autogenerated by Sphinx. Refer to documentation
89# for a list of supported languages.
Alex Gaynorffcf3b12014-03-26 13:10:10 -070090# language = None
Alex Gaynorc62e91f2013-08-06 19:25:52 -070091
92# There are two options for replacing |today|: either, you set today to some
93# non-false value, then it is used:
Alex Gaynorffcf3b12014-03-26 13:10:10 -070094# today = ''
Alex Gaynorc62e91f2013-08-06 19:25:52 -070095# Else, today_fmt is used as the format for a strftime call.
Alex Gaynorffcf3b12014-03-26 13:10:10 -070096# today_fmt = '%B %d, %Y'
Alex Gaynorc62e91f2013-08-06 19:25:52 -070097
98# List of patterns, relative to source directory, that match files and
99# directories to ignore when looking for source files.
Lucia Lic6ba99d2021-11-08 22:06:11 +0800100exclude_patterns = ["_build"]
Alex Gaynorc62e91f2013-08-06 19:25:52 -0700101
Alex Gaynord21da672013-08-07 08:12:16 -0700102# The reST default role (used for this markup: `text`) to use for all documents
Alex Gaynorffcf3b12014-03-26 13:10:10 -0700103# default_role = None
Alex Gaynorc62e91f2013-08-06 19:25:52 -0700104
105# If true, '()' will be appended to :func: etc. cross-reference text.
Alex Gaynorffcf3b12014-03-26 13:10:10 -0700106# add_function_parentheses = True
Alex Gaynorc62e91f2013-08-06 19:25:52 -0700107
108# If true, the current module name will be prepended to all description
109# unit titles (such as .. function::).
Alex Gaynorffcf3b12014-03-26 13:10:10 -0700110# add_module_names = True
Alex Gaynorc62e91f2013-08-06 19:25:52 -0700111
112# If true, sectionauthor and moduleauthor directives will be shown in the
113# output. They are ignored by default.
Alex Gaynorffcf3b12014-03-26 13:10:10 -0700114# show_authors = False
Alex Gaynorc62e91f2013-08-06 19:25:52 -0700115
116# The name of the Pygments (syntax highlighting) style to use.
Lucia Lic6ba99d2021-11-08 22:06:11 +0800117pygments_style = "sphinx"
Alex Gaynorc62e91f2013-08-06 19:25:52 -0700118
Alex Gaynord21da672013-08-07 08:12:16 -0700119# -- Options for HTML output --------------------------------------------------
Alex Gaynorc62e91f2013-08-06 19:25:52 -0700120
121# The theme to use for HTML and HTML Help pages. See the documentation for
122# a list of builtin themes.
Alex Gaynor27283cf2013-11-08 10:49:22 -0800123
124if sphinx_rtd_theme:
125 html_theme = "sphinx_rtd_theme"
126 html_theme_path = [sphinx_rtd_theme.get_html_theme_path()]
127else:
128 html_theme = "default"
Alex Gaynorc62e91f2013-08-06 19:25:52 -0700129
Alex Gaynorc62e91f2013-08-06 19:25:52 -0700130# 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 Lic6ba99d2021-11-08 22:06:11 +0800133html_static_path = ["_static"]
Alex Gaynorc62e91f2013-08-06 19:25:52 -0700134
Alex Gaynorc62e91f2013-08-06 19:25:52 -0700135# Output file base name for HTML help builder.
Lucia Lic6ba99d2021-11-08 22:06:11 +0800136htmlhelp_basename = "Cryptographydoc"
Alex Gaynorc62e91f2013-08-06 19:25:52 -0700137
138
Alex Gaynord21da672013-08-07 08:12:16 -0700139# -- Options for LaTeX output -------------------------------------------------
Alex Gaynorc62e91f2013-08-06 19:25:52 -0700140
Lucia Lic6ba99d2021-11-08 22:06:11 +0800141latex_elements = {}
Alex Gaynorc62e91f2013-08-06 19:25:52 -0700142
143# Grouping the document tree into LaTeX files. List of tuples
Alex Gaynord21da672013-08-07 08:12:16 -0700144# (source start file, target name, title, author, documentclass [howto/manual])
Alex Gaynorc62e91f2013-08-06 19:25:52 -0700145latex_documents = [
Lucia Lic6ba99d2021-11-08 22:06:11 +0800146 (
147 "index",
148 "Cryptography.tex",
149 "Cryptography Documentation",
150 "Individual Contributors",
151 "manual",
152 ),
Alex Gaynorc62e91f2013-08-06 19:25:52 -0700153]
154
Alex Gaynord21da672013-08-07 08:12:16 -0700155# -- Options for manual page output -------------------------------------------
Alex Gaynorc62e91f2013-08-06 19:25:52 -0700156
157# One entry per manual page. List of tuples
158# (source start file, name, description, authors, manual section).
159man_pages = [
Lucia Lic6ba99d2021-11-08 22:06:11 +0800160 (
161 "index",
162 "cryptography",
163 "Cryptography Documentation",
164 ["Individual Contributors"],
165 1,
166 )
Alex Gaynorc62e91f2013-08-06 19:25:52 -0700167]
168
Alex Gaynord21da672013-08-07 08:12:16 -0700169# -- Options for Texinfo output -----------------------------------------------
Alex Gaynorc62e91f2013-08-06 19:25:52 -0700170
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)
174texinfo_documents = [
Lucia Lic6ba99d2021-11-08 22:06:11 +0800175 (
176 "index",
177 "Cryptography",
178 "Cryptography Documentation",
179 "Individual Contributors",
180 "Cryptography",
181 "One line description of project.",
182 "Miscellaneous",
183 ),
Alex Gaynorc62e91f2013-08-06 19:25:52 -0700184]
185
Alex Gaynorc62e91f2013-08-06 19:25:52 -0700186# Example configuration for intersphinx: refer to the Python standard library.
Lucia Lic6ba99d2021-11-08 22:06:11 +0800187intersphinx_mapping = {"https://docs.python.org/3": None}
David Reiddd97bfe2014-01-16 19:46:22 -0800188
Lucia Lic6ba99d2021-11-08 22:06:11 +0800189epub_theme = "epub"
Alex Gaynor357f9772016-02-13 09:58:38 -0500190
191# Retry requests in the linkcheck builder so that we're resillient against
192# transient network errors.
Alex Gaynord7c0c142019-01-17 21:32:08 -0500193linkcheck_retries = 10
Alex Gaynoraef8ebc2017-05-29 00:12:30 -0400194
Lucia Lic6ba99d2021-11-08 22:06:11 +0800195linkcheck_timeout = 5
196
Alex Gaynoraef8ebc2017-05-29 00:12:30 -0400197linkcheck_ignore = [
Alex Gaynor84f6c1b2018-10-29 23:18:41 -0400198 # Small DH key results in a TLS failure on modern OpenSSL
Lucia Lic6ba99d2021-11-08 22:06:11 +0800199 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 Gaynoraef8ebc2017-05-29 00:12:30 -0400202]