1# -*- coding: utf-8 -*-
2
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.
6
7#
8# Cryptography documentation build configuration file, created by
9# sphinx-quickstart on Tue Aug  6 19:19:14 2013.
10#
11# This file is execfile()d with the current directory set to its containing dir
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
19from __future__ import absolute_import, division, print_function
20
21import os
22import sys
23
24try:
25    import sphinx_rtd_theme
26except ImportError:
27    sphinx_rtd_theme = None
28
29try:
30    from sphinxcontrib import spelling
31except ImportError:
32    spelling = None
33
34
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.
38sys.path.insert(0, os.path.abspath('.'))
39
40# -- General configuration ----------------------------------------------------
41
42# If your documentation needs a minimal Sphinx version, state it here.
43# needs_sphinx = '1.0'
44
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.
47extensions = [
48    'sphinx.ext.autodoc',
49    'sphinx.ext.doctest',
50    'sphinx.ext.intersphinx',
51    'sphinx.ext.viewcode',
52    'cryptography-docs',
53]
54
55if spelling is not None:
56    extensions.append('sphinxcontrib.spelling')
57
58# Add any paths that contain templates here, relative to this directory.
59templates_path = ['_templates']
60
61nitpicky = True
62
63# The suffix of source filenames.
64source_suffix = '.rst'
65
66# The encoding of source files.
67# source_encoding = 'utf-8-sig'
68
69# The master toctree document.
70master_doc = 'index'
71
72# General information about the project.
73project = 'Cryptography'
74copyright = '2013-2017, Individual Contributors'
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#
80
81base_dir = os.path.join(os.path.dirname(__file__), os.pardir)
82about = {}
83with open(os.path.join(base_dir, "src", "cryptography", "__about__.py")) as f:
84    exec(f.read(), about)
85
86version = release = about["__version__"]
87
88# The language for content autogenerated by Sphinx. Refer to documentation
89# for a list of supported languages.
90# language = None
91
92# There are two options for replacing |today|: either, you set today to some
93# non-false value, then it is used:
94# today = ''
95# Else, today_fmt is used as the format for a strftime call.
96# today_fmt = '%B %d, %Y'
97
98# List of patterns, relative to source directory, that match files and
99# directories to ignore when looking for source files.
100exclude_patterns = ['_build']
101
102# The reST default role (used for this markup: `text`) to use for all documents
103# default_role = None
104
105# If true, '()' will be appended to :func: etc. cross-reference text.
106# add_function_parentheses = True
107
108# If true, the current module name will be prepended to all description
109# unit titles (such as .. function::).
110# add_module_names = True
111
112# If true, sectionauthor and moduleauthor directives will be shown in the
113# output. They are ignored by default.
114# show_authors = False
115
116# The name of the Pygments (syntax highlighting) style to use.
117pygments_style = 'sphinx'
118
119# -- Options for HTML output --------------------------------------------------
120
121# The theme to use for HTML and HTML Help pages.  See the documentation for
122# a list of builtin themes.
123
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"
129
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".
133html_static_path = ['_static']
134
135# Output file base name for HTML help builder.
136htmlhelp_basename = 'Cryptographydoc'
137
138
139# -- Options for LaTeX output -------------------------------------------------
140
141latex_elements = {
142}
143
144# Grouping the document tree into LaTeX files. List of tuples
145# (source start file, target name, title, author, documentclass [howto/manual])
146latex_documents = [
147    ('index', 'Cryptography.tex', 'Cryptography Documentation',
148        'Individual Contributors', 'manual'),
149]
150
151# -- Options for manual page output -------------------------------------------
152
153# One entry per manual page. List of tuples
154# (source start file, name, description, authors, manual section).
155man_pages = [
156    ('index', 'cryptography', 'Cryptography Documentation',
157        ['Individual Contributors'], 1)
158]
159
160# -- Options for Texinfo output -----------------------------------------------
161
162# Grouping the document tree into Texinfo files. List of tuples
163# (source start file, target name, title, author,
164#  dir menu entry, description, category)
165texinfo_documents = [
166    ('index', 'Cryptography', 'Cryptography Documentation',
167        'Individual Contributors', 'Cryptography',
168        'One line description of project.',
169        'Miscellaneous'),
170]
171
172# Example configuration for intersphinx: refer to the Python standard library.
173intersphinx_mapping = {'https://docs.python.org/3': None}
174
175epub_theme = 'epub'
176
177# Retry requests in the linkcheck builder so that we're resillient against
178# transient network errors.
179linkcheck_retries = 10
180
181linkcheck_ignore = [
182    # Small DH key results in a TLS failure on modern OpenSSL
183    "https://info.isl.ntt.co.jp/crypt/eng/camellia/",
184]
185