blob: 66dae738feac27f3ac119aab2a3688fad06b4a14 [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.
Alex Gaynoraf82d5e2013-10-29 17:07:24 -070038sys.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 = [
48 'sphinx.ext.autodoc',
Donald Stufft235fa712013-08-11 17:47:17 -040049 'sphinx.ext.doctest',
Alex Gaynord21da672013-08-07 08:12:16 -070050 'sphinx.ext.intersphinx',
51 'sphinx.ext.viewcode',
Alex Gaynoraf82d5e2013-10-29 17:07:24 -070052 '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:
56 extensions.append('sphinxcontrib.spelling')
57
Alex Gaynorc62e91f2013-08-06 19:25:52 -070058# Add any paths that contain templates here, relative to this directory.
59templates_path = ['_templates']
60
Paul Kehrer45efdbc2015-02-12 10:58:22 -060061nitpicky = True
62
Alex Gaynorc62e91f2013-08-06 19:25:52 -070063# The suffix of source filenames.
64source_suffix = '.rst'
65
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.
70master_doc = 'index'
71
72# General information about the project.
Alex Gaynorc113c3b2013-08-07 08:36:20 -070073project = 'Cryptography'
Alex Gaynor1c2458e2016-12-31 19:53:11 -050074copyright = '2013-2017, 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:
Alex Gaynor2b22fae2014-01-06 13:19:33 -080084 exec(f.read(), about)
85
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.
100exclude_patterns = ['_build']
101
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.
117pygments_style = 'sphinx'
118
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".
133html_static_path = ['_static']
134
Alex Gaynorc62e91f2013-08-06 19:25:52 -0700135# Output file base name for HTML help builder.
136htmlhelp_basename = 'Cryptographydoc'
137
138
Alex Gaynord21da672013-08-07 08:12:16 -0700139# -- Options for LaTeX output -------------------------------------------------
Alex Gaynorc62e91f2013-08-06 19:25:52 -0700140
141latex_elements = {
Alex Gaynorc62e91f2013-08-06 19:25:52 -0700142}
143
144# Grouping the document tree into LaTeX files. List of tuples
Alex Gaynord21da672013-08-07 08:12:16 -0700145# (source start file, target name, title, author, documentclass [howto/manual])
Alex Gaynorc62e91f2013-08-06 19:25:52 -0700146latex_documents = [
Alex Gaynorc113c3b2013-08-07 08:36:20 -0700147 ('index', 'Cryptography.tex', 'Cryptography Documentation',
148 'Individual Contributors', 'manual'),
Alex Gaynorc62e91f2013-08-06 19:25:52 -0700149]
150
Alex Gaynord21da672013-08-07 08:12:16 -0700151# -- Options for manual page output -------------------------------------------
Alex Gaynorc62e91f2013-08-06 19:25:52 -0700152
153# One entry per manual page. List of tuples
154# (source start file, name, description, authors, manual section).
155man_pages = [
Alex Gaynorc113c3b2013-08-07 08:36:20 -0700156 ('index', 'cryptography', 'Cryptography Documentation',
157 ['Individual Contributors'], 1)
Alex Gaynorc62e91f2013-08-06 19:25:52 -0700158]
159
Alex Gaynord21da672013-08-07 08:12:16 -0700160# -- Options for Texinfo output -----------------------------------------------
Alex Gaynorc62e91f2013-08-06 19:25:52 -0700161
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 = [
Alex Gaynorc113c3b2013-08-07 08:36:20 -0700166 ('index', 'Cryptography', 'Cryptography Documentation',
167 'Individual Contributors', 'Cryptography',
Alex Gaynord21da672013-08-07 08:12:16 -0700168 'One line description of project.',
169 'Miscellaneous'),
Alex Gaynorc62e91f2013-08-06 19:25:52 -0700170]
171
Alex Gaynorc62e91f2013-08-06 19:25:52 -0700172# Example configuration for intersphinx: refer to the Python standard library.
Paul Kehrer45efdbc2015-02-12 10:58:22 -0600173intersphinx_mapping = {'https://docs.python.org/3': None}
David Reiddd97bfe2014-01-16 19:46:22 -0800174
175epub_theme = 'epub'
Alex Gaynor357f9772016-02-13 09:58:38 -0500176
177# Retry requests in the linkcheck builder so that we're resillient against
178# transient network errors.
Alex Gaynore2e87822017-06-05 21:51:48 -0400179linkcheck_retries = 5
Alex Gaynoraef8ebc2017-05-29 00:12:30 -0400180
181linkcheck_ignore = [
Alex Gaynora9feff32018-10-23 19:59:55 -0400182 # Returns a 404 if you're not logged in
183 (
184 "https://ci.cryptography.io/"
185 "job/cryptography-support-jobs/job/openssl-release-1.1/"
186 ),
Alex Gaynoraef8ebc2017-05-29 00:12:30 -0400187]