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. |
Alex Gaynor | af82d5e | 2013-10-29 17:07:24 -0700 | [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 = [ |
| 48 | 'sphinx.ext.autodoc', |
Donald Stufft | 235fa71 | 2013-08-11 17:47:17 -0400 | [diff] [blame] | 49 | 'sphinx.ext.doctest', |
Alex Gaynor | d21da67 | 2013-08-07 08:12:16 -0700 | [diff] [blame] | 50 | 'sphinx.ext.intersphinx', |
| 51 | 'sphinx.ext.viewcode', |
Alex Gaynor | af82d5e | 2013-10-29 17:07:24 -0700 | [diff] [blame] | 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: |
| 56 | extensions.append('sphinxcontrib.spelling') |
| 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. |
| 59 | templates_path = ['_templates'] |
| 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. |
| 64 | source_suffix = '.rst' |
| 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. |
| 70 | master_doc = 'index' |
| 71 | |
| 72 | # General information about the project. |
Alex Gaynor | c113c3b | 2013-08-07 08:36:20 -0700 | [diff] [blame] | 73 | project = 'Cryptography' |
Alex Gaynor | 1c2458e | 2016-12-31 19:53:11 -0500 | [diff] [blame] | 74 | copyright = '2013-2017, 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: |
Alex Gaynor | 2b22fae | 2014-01-06 13:19:33 -0800 | [diff] [blame] | 84 | exec(f.read(), about) |
| 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. |
| 100 | exclude_patterns = ['_build'] |
| 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. |
| 117 | pygments_style = 'sphinx' |
| 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". |
| 133 | html_static_path = ['_static'] |
| 134 | |
Alex Gaynor | c62e91f | 2013-08-06 19:25:52 -0700 | [diff] [blame] | 135 | # Output file base name for HTML help builder. |
| 136 | htmlhelp_basename = 'Cryptographydoc' |
| 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 | |
| 141 | latex_elements = { |
Alex Gaynor | c62e91f | 2013-08-06 19:25:52 -0700 | [diff] [blame] | 142 | } |
| 143 | |
| 144 | # Grouping the document tree into LaTeX files. List of tuples |
Alex Gaynor | d21da67 | 2013-08-07 08:12:16 -0700 | [diff] [blame] | 145 | # (source start file, target name, title, author, documentclass [howto/manual]) |
Alex Gaynor | c62e91f | 2013-08-06 19:25:52 -0700 | [diff] [blame] | 146 | latex_documents = [ |
Alex Gaynor | c113c3b | 2013-08-07 08:36:20 -0700 | [diff] [blame] | 147 | ('index', 'Cryptography.tex', 'Cryptography Documentation', |
| 148 | 'Individual Contributors', 'manual'), |
Alex Gaynor | c62e91f | 2013-08-06 19:25:52 -0700 | [diff] [blame] | 149 | ] |
| 150 | |
Alex Gaynor | d21da67 | 2013-08-07 08:12:16 -0700 | [diff] [blame] | 151 | # -- Options for manual page output ------------------------------------------- |
Alex Gaynor | c62e91f | 2013-08-06 19:25:52 -0700 | [diff] [blame] | 152 | |
| 153 | # One entry per manual page. List of tuples |
| 154 | # (source start file, name, description, authors, manual section). |
| 155 | man_pages = [ |
Alex Gaynor | c113c3b | 2013-08-07 08:36:20 -0700 | [diff] [blame] | 156 | ('index', 'cryptography', 'Cryptography Documentation', |
| 157 | ['Individual Contributors'], 1) |
Alex Gaynor | c62e91f | 2013-08-06 19:25:52 -0700 | [diff] [blame] | 158 | ] |
| 159 | |
Alex Gaynor | d21da67 | 2013-08-07 08:12:16 -0700 | [diff] [blame] | 160 | # -- Options for Texinfo output ----------------------------------------------- |
Alex Gaynor | c62e91f | 2013-08-06 19:25:52 -0700 | [diff] [blame] | 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) |
| 165 | texinfo_documents = [ |
Alex Gaynor | c113c3b | 2013-08-07 08:36:20 -0700 | [diff] [blame] | 166 | ('index', 'Cryptography', 'Cryptography Documentation', |
| 167 | 'Individual Contributors', 'Cryptography', |
Alex Gaynor | d21da67 | 2013-08-07 08:12:16 -0700 | [diff] [blame] | 168 | 'One line description of project.', |
| 169 | 'Miscellaneous'), |
Alex Gaynor | c62e91f | 2013-08-06 19:25:52 -0700 | [diff] [blame] | 170 | ] |
| 171 | |
Alex Gaynor | c62e91f | 2013-08-06 19:25:52 -0700 | [diff] [blame] | 172 | # Example configuration for intersphinx: refer to the Python standard library. |
Paul Kehrer | 45efdbc | 2015-02-12 10:58:22 -0600 | [diff] [blame] | 173 | intersphinx_mapping = {'https://docs.python.org/3': None} |
David Reid | dd97bfe | 2014-01-16 19:46:22 -0800 | [diff] [blame] | 174 | |
| 175 | epub_theme = 'epub' |
Alex Gaynor | 357f977 | 2016-02-13 09:58:38 -0500 | [diff] [blame] | 176 | |
| 177 | # Retry requests in the linkcheck builder so that we're resillient against |
| 178 | # transient network errors. |
| 179 | linkcheck_retries = 2 |