| Jonathan Ballet | 0646a24 | 2011-07-16 07:13:03 +0900 | [diff] [blame] | 1 | # -*- coding: utf-8 -*- |
| 2 | # |
| 3 | # pyOpenSSL documentation build configuration file, created by |
| 4 | # sphinx-quickstart on Sat Jul 16 07:12:22 2011. |
| 5 | # |
| 6 | # This file is execfile()d with the current directory set to its containing dir. |
| 7 | # |
| 8 | # Note that not all possible configuration values are present in this |
| 9 | # autogenerated file. |
| 10 | # |
| 11 | # All configuration values have a default; values that are commented out |
| 12 | # serve to show the default. |
| 13 | |
| Hynek Schlawack | 5bc17cb | 2015-04-30 19:21:40 +0200 | [diff] [blame] | 14 | import datetime |
| 15 | import codecs |
| 16 | import os |
| 17 | import re |
| 18 | import sys |
| 19 | |
| 20 | |
| 21 | HERE = os.path.abspath(os.path.dirname(__file__)) |
| 22 | |
| 23 | |
| 24 | def read_file(*parts): |
| 25 | """ |
| Alex Gaynor | ca87ff6 | 2015-09-04 23:31:03 -0400 | [diff] [blame] | 26 | Build an absolute path from *parts* and return the contents of the |
| Hynek Schlawack | 5bc17cb | 2015-04-30 19:21:40 +0200 | [diff] [blame] | 27 | resulting file. Assume UTF-8 encoding. |
| 28 | """ |
| 29 | with codecs.open(os.path.join(HERE, *parts), "rb", "ascii") as f: |
| 30 | return f.read() |
| 31 | |
| 32 | |
| 33 | def find_version(*file_paths): |
| 34 | version_file = read_file(*file_paths) |
| Alex Gaynor | 0373718 | 2020-07-23 20:40:46 -0400 | [diff] [blame] | 35 | version_match = re.search( |
| 36 | r"^__version__ = ['\"]([^'\"]*)['\"]", version_file, re.M |
| 37 | ) |
| Hynek Schlawack | 5bc17cb | 2015-04-30 19:21:40 +0200 | [diff] [blame] | 38 | if version_match: |
| 39 | return version_match.group(1) |
| 40 | raise RuntimeError("Unable to find version string.") |
| 41 | |
| Jonathan Ballet | 0646a24 | 2011-07-16 07:13:03 +0900 | [diff] [blame] | 42 | |
| Jonathan Ballet | 648875f | 2011-07-16 14:14:58 +0900 | [diff] [blame] | 43 | DOC_DIR = os.path.abspath(os.path.dirname(__file__)) |
| 44 | sys.path.insert(0, os.path.abspath(os.path.join(DOC_DIR, ".."))) |
| 45 | |
| Jonathan Ballet | 0646a24 | 2011-07-16 07:13:03 +0900 | [diff] [blame] | 46 | # If extensions (or modules to document with autodoc) are in another directory, |
| 47 | # add these directories to sys.path here. If the directory is relative to the |
| 48 | # documentation root, use os.path.abspath to make it absolute, like shown here. |
| Alex Gaynor | 0373718 | 2020-07-23 20:40:46 -0400 | [diff] [blame] | 49 | # sys.path.insert(0, os.path.abspath('.')) |
| Jonathan Ballet | 0646a24 | 2011-07-16 07:13:03 +0900 | [diff] [blame] | 50 | |
| 51 | # -- General configuration ----------------------------------------------------- |
| 52 | |
| 53 | # If your documentation needs a minimal Sphinx version, state it here. |
| Alex Gaynor | 0373718 | 2020-07-23 20:40:46 -0400 | [diff] [blame] | 54 | needs_sphinx = "1.0" |
| Jonathan Ballet | 0646a24 | 2011-07-16 07:13:03 +0900 | [diff] [blame] | 55 | |
| Hynek Schlawack | 01c3167 | 2016-12-11 15:14:09 +0100 | [diff] [blame] | 56 | # Add any Sphinx extension module names here, as strings. They can be |
| 57 | # extensions coming with Sphinx (named 'sphinx.ext.*') or your custom ones. |
| 58 | extensions = [ |
| 59 | "sphinx.ext.autodoc", |
| Alex Gaynor | 0373718 | 2020-07-23 20:40:46 -0400 | [diff] [blame] | 60 | "sphinx.ext.intersphinx", |
| Hynek Schlawack | 01c3167 | 2016-12-11 15:14:09 +0100 | [diff] [blame] | 61 | ] |
| Jonathan Ballet | 0646a24 | 2011-07-16 07:13:03 +0900 | [diff] [blame] | 62 | |
| 63 | # Add any paths that contain templates here, relative to this directory. |
| Alex Gaynor | 0373718 | 2020-07-23 20:40:46 -0400 | [diff] [blame] | 64 | templates_path = ["_templates"] |
| Jonathan Ballet | 0646a24 | 2011-07-16 07:13:03 +0900 | [diff] [blame] | 65 | |
| 66 | # The suffix of source filenames. |
| Alex Gaynor | 0373718 | 2020-07-23 20:40:46 -0400 | [diff] [blame] | 67 | source_suffix = ".rst" |
| Jonathan Ballet | 0646a24 | 2011-07-16 07:13:03 +0900 | [diff] [blame] | 68 | |
| 69 | # The encoding of source files. |
| Alex Gaynor | 0373718 | 2020-07-23 20:40:46 -0400 | [diff] [blame] | 70 | # source_encoding = 'utf-8-sig' |
| Jonathan Ballet | 0646a24 | 2011-07-16 07:13:03 +0900 | [diff] [blame] | 71 | |
| 72 | # The master toctree document. |
| Alex Gaynor | 0373718 | 2020-07-23 20:40:46 -0400 | [diff] [blame] | 73 | master_doc = "index" |
| Jonathan Ballet | 0646a24 | 2011-07-16 07:13:03 +0900 | [diff] [blame] | 74 | |
| 75 | # General information about the project. |
| Alex Gaynor | 0373718 | 2020-07-23 20:40:46 -0400 | [diff] [blame] | 76 | project = u"pyOpenSSL" |
| Hynek Schlawack | 5bc17cb | 2015-04-30 19:21:40 +0200 | [diff] [blame] | 77 | authors = u"The pyOpenSSL developers" |
| Hynek Schlawack | 01c3167 | 2016-12-11 15:14:09 +0100 | [diff] [blame] | 78 | copyright = u"2001 " + authors |
| Jonathan Ballet | 0646a24 | 2011-07-16 07:13:03 +0900 | [diff] [blame] | 79 | |
| 80 | # The version info for the project you're documenting, acts as replacement for |
| 81 | # |version| and |release|, also used in various other places throughout the |
| 82 | # built documents. |
| 83 | # |
| 84 | # The short X.Y version. |
| Hynek Schlawack | 7b3aa90 | 2015-10-16 21:06:20 +0200 | [diff] [blame] | 85 | version = find_version("..", "src", "OpenSSL", "version.py") |
| Jonathan Ballet | 0646a24 | 2011-07-16 07:13:03 +0900 | [diff] [blame] | 86 | # The full version, including alpha/beta/rc tags. |
| Hynek Schlawack | 76ecf94 | 2015-04-14 11:09:44 -0400 | [diff] [blame] | 87 | release = version |
| Jonathan Ballet | 0646a24 | 2011-07-16 07:13:03 +0900 | [diff] [blame] | 88 | |
| 89 | # The language for content autogenerated by Sphinx. Refer to documentation |
| 90 | # for a list of supported languages. |
| Alex Gaynor | 0373718 | 2020-07-23 20:40:46 -0400 | [diff] [blame] | 91 | # language = None |
| Jonathan Ballet | 0646a24 | 2011-07-16 07:13:03 +0900 | [diff] [blame] | 92 | |
| 93 | # There are two options for replacing |today|: either, you set today to some |
| 94 | # non-false value, then it is used: |
| Alex Gaynor | 0373718 | 2020-07-23 20:40:46 -0400 | [diff] [blame] | 95 | # today = '' |
| Jonathan Ballet | 0646a24 | 2011-07-16 07:13:03 +0900 | [diff] [blame] | 96 | # Else, today_fmt is used as the format for a strftime call. |
| Alex Gaynor | 0373718 | 2020-07-23 20:40:46 -0400 | [diff] [blame] | 97 | # today_fmt = '%B %d, %Y' |
| Jonathan Ballet | 0646a24 | 2011-07-16 07:13:03 +0900 | [diff] [blame] | 98 | |
| 99 | # List of patterns, relative to source directory, that match files and |
| 100 | # directories to ignore when looking for source files. |
| Alex Gaynor | 0373718 | 2020-07-23 20:40:46 -0400 | [diff] [blame] | 101 | exclude_patterns = ["_build"] |
| Jonathan Ballet | 0646a24 | 2011-07-16 07:13:03 +0900 | [diff] [blame] | 102 | |
| 103 | # The reST default role (used for this markup: `text`) to use for all documents. |
| Alex Gaynor | 0373718 | 2020-07-23 20:40:46 -0400 | [diff] [blame] | 104 | # default_role = None |
| Jonathan Ballet | 0646a24 | 2011-07-16 07:13:03 +0900 | [diff] [blame] | 105 | |
| 106 | # If true, '()' will be appended to :func: etc. cross-reference text. |
| Alex Gaynor | 0373718 | 2020-07-23 20:40:46 -0400 | [diff] [blame] | 107 | # add_function_parentheses = True |
| Jonathan Ballet | 0646a24 | 2011-07-16 07:13:03 +0900 | [diff] [blame] | 108 | |
| 109 | # If true, the current module name will be prepended to all description |
| 110 | # unit titles (such as .. function::). |
| Alex Gaynor | 0373718 | 2020-07-23 20:40:46 -0400 | [diff] [blame] | 111 | # add_module_names = True |
| Jonathan Ballet | 0646a24 | 2011-07-16 07:13:03 +0900 | [diff] [blame] | 112 | |
| 113 | # If true, sectionauthor and moduleauthor directives will be shown in the |
| 114 | # output. They are ignored by default. |
| Alex Gaynor | 0373718 | 2020-07-23 20:40:46 -0400 | [diff] [blame] | 115 | # show_authors = False |
| Jonathan Ballet | 0646a24 | 2011-07-16 07:13:03 +0900 | [diff] [blame] | 116 | |
| 117 | # The name of the Pygments (syntax highlighting) style to use. |
| Alex Gaynor | 0373718 | 2020-07-23 20:40:46 -0400 | [diff] [blame] | 118 | pygments_style = "sphinx" |
| Jonathan Ballet | 0646a24 | 2011-07-16 07:13:03 +0900 | [diff] [blame] | 119 | |
| 120 | # A list of ignored prefixes for module index sorting. |
| Alex Gaynor | 0373718 | 2020-07-23 20:40:46 -0400 | [diff] [blame] | 121 | # modindex_common_prefix = [] |
| Jonathan Ballet | 0646a24 | 2011-07-16 07:13:03 +0900 | [diff] [blame] | 122 | |
| 123 | |
| 124 | # -- Options for HTML output --------------------------------------------------- |
| 125 | |
| 126 | # The theme to use for HTML and HTML Help pages. See the documentation for |
| 127 | # a list of builtin themes. |
| Alex Gaynor | 0373718 | 2020-07-23 20:40:46 -0400 | [diff] [blame] | 128 | on_rtd = os.environ.get("READTHEDOCS", None) == "True" |
| Hynek Schlawack | 76ed8e0 | 2015-05-28 14:40:11 +0200 | [diff] [blame] | 129 | |
| 130 | if not on_rtd: # only import and set the theme if we're building docs locally |
| 131 | import sphinx_rtd_theme |
| Alex Gaynor | 0373718 | 2020-07-23 20:40:46 -0400 | [diff] [blame] | 132 | |
| 133 | html_theme = "sphinx_rtd_theme" |
| Hynek Schlawack | 76ed8e0 | 2015-05-28 14:40:11 +0200 | [diff] [blame] | 134 | html_theme_path = [sphinx_rtd_theme.get_html_theme_path()] |
| Jonathan Ballet | 0646a24 | 2011-07-16 07:13:03 +0900 | [diff] [blame] | 135 | |
| 136 | # Theme options are theme-specific and customize the look and feel of a theme |
| 137 | # further. For a list of options available for each theme, see the |
| 138 | # documentation. |
| Alex Gaynor | 0373718 | 2020-07-23 20:40:46 -0400 | [diff] [blame] | 139 | # html_theme_options = {} |
| Jonathan Ballet | 0646a24 | 2011-07-16 07:13:03 +0900 | [diff] [blame] | 140 | |
| 141 | # Add any paths that contain custom themes here, relative to this directory. |
| Alex Gaynor | 0373718 | 2020-07-23 20:40:46 -0400 | [diff] [blame] | 142 | # html_theme_path = [] |
| Jonathan Ballet | 0646a24 | 2011-07-16 07:13:03 +0900 | [diff] [blame] | 143 | |
| 144 | # The name for this set of Sphinx documents. If None, it defaults to |
| 145 | # "<project> v<release> documentation". |
| Alex Gaynor | 0373718 | 2020-07-23 20:40:46 -0400 | [diff] [blame] | 146 | # html_title = None |
| Jonathan Ballet | 0646a24 | 2011-07-16 07:13:03 +0900 | [diff] [blame] | 147 | |
| 148 | # A shorter title for the navigation bar. Default is the same as html_title. |
| Alex Gaynor | 0373718 | 2020-07-23 20:40:46 -0400 | [diff] [blame] | 149 | # html_short_title = None |
| Jonathan Ballet | 0646a24 | 2011-07-16 07:13:03 +0900 | [diff] [blame] | 150 | |
| 151 | # The name of an image file (relative to this directory) to place at the top |
| 152 | # of the sidebar. |
| Alex Gaynor | 0373718 | 2020-07-23 20:40:46 -0400 | [diff] [blame] | 153 | # html_logo = None |
| Jonathan Ballet | 0646a24 | 2011-07-16 07:13:03 +0900 | [diff] [blame] | 154 | |
| 155 | # The name of an image file (within the static path) to use as favicon of the |
| 156 | # docs. This file should be a Windows icon file (.ico) being 16x16 or 32x32 |
| 157 | # pixels large. |
| Alex Gaynor | 0373718 | 2020-07-23 20:40:46 -0400 | [diff] [blame] | 158 | # html_favicon = None |
| Jonathan Ballet | 0646a24 | 2011-07-16 07:13:03 +0900 | [diff] [blame] | 159 | |
| 160 | # Add any paths that contain custom static files (such as style sheets) here, |
| 161 | # relative to this directory. They are copied after the builtin static files, |
| 162 | # so a file named "default.css" will overwrite the builtin "default.css". |
| Hynek Schlawack | 4202f0d | 2015-04-14 20:09:21 -0400 | [diff] [blame] | 163 | # html_static_path = ['_static'] |
| Jonathan Ballet | 0646a24 | 2011-07-16 07:13:03 +0900 | [diff] [blame] | 164 | |
| 165 | # If not '', a 'Last updated on:' timestamp is inserted at every page bottom, |
| 166 | # using the given strftime format. |
| Alex Gaynor | 0373718 | 2020-07-23 20:40:46 -0400 | [diff] [blame] | 167 | # html_last_updated_fmt = '%b %d, %Y' |
| Jonathan Ballet | 0646a24 | 2011-07-16 07:13:03 +0900 | [diff] [blame] | 168 | |
| 169 | # If true, SmartyPants will be used to convert quotes and dashes to |
| 170 | # typographically correct entities. |
| Alex Gaynor | 0373718 | 2020-07-23 20:40:46 -0400 | [diff] [blame] | 171 | # html_use_smartypants = True |
| Jonathan Ballet | 0646a24 | 2011-07-16 07:13:03 +0900 | [diff] [blame] | 172 | |
| 173 | # Custom sidebar templates, maps document names to template names. |
| Alex Gaynor | 0373718 | 2020-07-23 20:40:46 -0400 | [diff] [blame] | 174 | # html_sidebars = {} |
| Jonathan Ballet | 0646a24 | 2011-07-16 07:13:03 +0900 | [diff] [blame] | 175 | |
| 176 | # Additional templates that should be rendered to pages, maps page names to |
| 177 | # template names. |
| Alex Gaynor | 0373718 | 2020-07-23 20:40:46 -0400 | [diff] [blame] | 178 | # html_additional_pages = {} |
| Jonathan Ballet | 0646a24 | 2011-07-16 07:13:03 +0900 | [diff] [blame] | 179 | |
| 180 | # If false, no module index is generated. |
| Alex Gaynor | 0373718 | 2020-07-23 20:40:46 -0400 | [diff] [blame] | 181 | # html_domain_indices = True |
| Jonathan Ballet | 0646a24 | 2011-07-16 07:13:03 +0900 | [diff] [blame] | 182 | |
| 183 | # If false, no index is generated. |
| Alex Gaynor | 0373718 | 2020-07-23 20:40:46 -0400 | [diff] [blame] | 184 | # html_use_index = True |
| Jonathan Ballet | 0646a24 | 2011-07-16 07:13:03 +0900 | [diff] [blame] | 185 | |
| 186 | # If true, the index is split into individual pages for each letter. |
| Alex Gaynor | 0373718 | 2020-07-23 20:40:46 -0400 | [diff] [blame] | 187 | # html_split_index = False |
| Jonathan Ballet | 0646a24 | 2011-07-16 07:13:03 +0900 | [diff] [blame] | 188 | |
| 189 | # If true, links to the reST sources are added to the pages. |
| Alex Gaynor | 0373718 | 2020-07-23 20:40:46 -0400 | [diff] [blame] | 190 | # html_show_sourcelink = True |
| Jonathan Ballet | 0646a24 | 2011-07-16 07:13:03 +0900 | [diff] [blame] | 191 | |
| 192 | # If true, "Created using Sphinx" is shown in the HTML footer. Default is True. |
| Alex Gaynor | 0373718 | 2020-07-23 20:40:46 -0400 | [diff] [blame] | 193 | # html_show_sphinx = True |
| Jonathan Ballet | 0646a24 | 2011-07-16 07:13:03 +0900 | [diff] [blame] | 194 | |
| 195 | # If true, "(C) Copyright ..." is shown in the HTML footer. Default is True. |
| Alex Gaynor | 0373718 | 2020-07-23 20:40:46 -0400 | [diff] [blame] | 196 | # html_show_copyright = True |
| Jonathan Ballet | 0646a24 | 2011-07-16 07:13:03 +0900 | [diff] [blame] | 197 | |
| 198 | # If true, an OpenSearch description file will be output, and all pages will |
| 199 | # contain a <link> tag referring to it. The value of this option must be the |
| 200 | # base URL from which the finished HTML is served. |
| Alex Gaynor | 0373718 | 2020-07-23 20:40:46 -0400 | [diff] [blame] | 201 | # html_use_opensearch = '' |
| Jonathan Ballet | 0646a24 | 2011-07-16 07:13:03 +0900 | [diff] [blame] | 202 | |
| 203 | # This is the file name suffix for HTML files (e.g. ".xhtml"). |
| Alex Gaynor | 0373718 | 2020-07-23 20:40:46 -0400 | [diff] [blame] | 204 | # html_file_suffix = None |
| Jonathan Ballet | 0646a24 | 2011-07-16 07:13:03 +0900 | [diff] [blame] | 205 | |
| 206 | # Output file base name for HTML help builder. |
| Alex Gaynor | 0373718 | 2020-07-23 20:40:46 -0400 | [diff] [blame] | 207 | htmlhelp_basename = "pyOpenSSLdoc" |
| Jonathan Ballet | 0646a24 | 2011-07-16 07:13:03 +0900 | [diff] [blame] | 208 | |
| 209 | |
| 210 | # -- Options for LaTeX output -------------------------------------------------- |
| 211 | |
| 212 | # The paper size ('letter' or 'a4'). |
| Alex Gaynor | 0373718 | 2020-07-23 20:40:46 -0400 | [diff] [blame] | 213 | # latex_paper_size = 'letter' |
| Jonathan Ballet | 0646a24 | 2011-07-16 07:13:03 +0900 | [diff] [blame] | 214 | |
| 215 | # The font size ('10pt', '11pt' or '12pt'). |
| Alex Gaynor | 0373718 | 2020-07-23 20:40:46 -0400 | [diff] [blame] | 216 | # latex_font_size = '10pt' |
| Jonathan Ballet | 0646a24 | 2011-07-16 07:13:03 +0900 | [diff] [blame] | 217 | |
| 218 | # Grouping the document tree into LaTeX files. List of tuples |
| 219 | # (source start file, target name, title, author, documentclass [howto/manual]). |
| 220 | latex_documents = [ |
| Alex Gaynor | 0373718 | 2020-07-23 20:40:46 -0400 | [diff] [blame] | 221 | ("index", "pyOpenSSL.tex", u"pyOpenSSL Documentation", authors, "manual"), |
| Jonathan Ballet | 0646a24 | 2011-07-16 07:13:03 +0900 | [diff] [blame] | 222 | ] |
| 223 | |
| 224 | # The name of an image file (relative to this directory) to place at the top of |
| 225 | # the title page. |
| Alex Gaynor | 0373718 | 2020-07-23 20:40:46 -0400 | [diff] [blame] | 226 | # latex_logo = None |
| Jonathan Ballet | 0646a24 | 2011-07-16 07:13:03 +0900 | [diff] [blame] | 227 | |
| 228 | # For "manual" documents, if this is true, then toplevel headings are parts, |
| 229 | # not chapters. |
| Alex Gaynor | 0373718 | 2020-07-23 20:40:46 -0400 | [diff] [blame] | 230 | # latex_use_parts = False |
| Jonathan Ballet | 0646a24 | 2011-07-16 07:13:03 +0900 | [diff] [blame] | 231 | |
| 232 | # If true, show page references after internal links. |
| Alex Gaynor | 0373718 | 2020-07-23 20:40:46 -0400 | [diff] [blame] | 233 | # latex_show_pagerefs = False |
| Jonathan Ballet | 0646a24 | 2011-07-16 07:13:03 +0900 | [diff] [blame] | 234 | |
| 235 | # If true, show URL addresses after external links. |
| Alex Gaynor | 0373718 | 2020-07-23 20:40:46 -0400 | [diff] [blame] | 236 | # latex_show_urls = False |
| Jonathan Ballet | 0646a24 | 2011-07-16 07:13:03 +0900 | [diff] [blame] | 237 | |
| 238 | # Additional stuff for the LaTeX preamble. |
| Alex Gaynor | 0373718 | 2020-07-23 20:40:46 -0400 | [diff] [blame] | 239 | # latex_preamble = '' |
| Jonathan Ballet | 0646a24 | 2011-07-16 07:13:03 +0900 | [diff] [blame] | 240 | |
| 241 | # Documents to append as an appendix to all manuals. |
| Alex Gaynor | 0373718 | 2020-07-23 20:40:46 -0400 | [diff] [blame] | 242 | # latex_appendices = [] |
| Jonathan Ballet | 0646a24 | 2011-07-16 07:13:03 +0900 | [diff] [blame] | 243 | |
| 244 | # If false, no module index is generated. |
| Alex Gaynor | 0373718 | 2020-07-23 20:40:46 -0400 | [diff] [blame] | 245 | # latex_domain_indices = True |
| Jonathan Ballet | 0646a24 | 2011-07-16 07:13:03 +0900 | [diff] [blame] | 246 | |
| 247 | |
| 248 | # -- Options for manual page output -------------------------------------------- |
| 249 | |
| 250 | # One entry per manual page. List of tuples |
| 251 | # (source start file, name, description, authors, manual section). |
| Alex Gaynor | 0373718 | 2020-07-23 20:40:46 -0400 | [diff] [blame] | 252 | man_pages = [("index", "pyopenssl", u"pyOpenSSL Documentation", [authors], 1)] |
| Hynek Schlawack | 01c3167 | 2016-12-11 15:14:09 +0100 | [diff] [blame] | 253 | |
| 254 | intersphinx_mapping = { |
| 255 | "https://docs.python.org/3": None, |
| 256 | "https://cryptography.io/en/latest/": None, |
| 257 | } |