blob: cb699c8225531fc74de8fdc73b03df960b622935 [file] [log] [blame]
Jonathan Ballet0646a242011-07-16 07:13:03 +09001# -*- 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 Schlawack5bc17cb2015-04-30 19:21:40 +020014import datetime
15import codecs
16import os
17import re
18import sys
19
20
21HERE = os.path.abspath(os.path.dirname(__file__))
22
23
24def read_file(*parts):
25 """
Alex Gaynorca87ff62015-09-04 23:31:03 -040026 Build an absolute path from *parts* and return the contents of the
Hynek Schlawack5bc17cb2015-04-30 19:21:40 +020027 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
33def find_version(*file_paths):
34 version_file = read_file(*file_paths)
Alex Gaynor03737182020-07-23 20:40:46 -040035 version_match = re.search(
36 r"^__version__ = ['\"]([^'\"]*)['\"]", version_file, re.M
37 )
Hynek Schlawack5bc17cb2015-04-30 19:21:40 +020038 if version_match:
39 return version_match.group(1)
40 raise RuntimeError("Unable to find version string.")
41
Jonathan Ballet0646a242011-07-16 07:13:03 +090042
Jonathan Ballet648875f2011-07-16 14:14:58 +090043DOC_DIR = os.path.abspath(os.path.dirname(__file__))
44sys.path.insert(0, os.path.abspath(os.path.join(DOC_DIR, "..")))
45
Jonathan Ballet0646a242011-07-16 07:13:03 +090046# 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 Gaynor03737182020-07-23 20:40:46 -040049# sys.path.insert(0, os.path.abspath('.'))
Jonathan Ballet0646a242011-07-16 07:13:03 +090050
51# -- General configuration -----------------------------------------------------
52
53# If your documentation needs a minimal Sphinx version, state it here.
Alex Gaynor03737182020-07-23 20:40:46 -040054needs_sphinx = "1.0"
Jonathan Ballet0646a242011-07-16 07:13:03 +090055
Hynek Schlawack01c31672016-12-11 15:14:09 +010056# Add any Sphinx extension module names here, as strings. They can be
57# extensions coming with Sphinx (named 'sphinx.ext.*') or your custom ones.
58extensions = [
59 "sphinx.ext.autodoc",
Alex Gaynor03737182020-07-23 20:40:46 -040060 "sphinx.ext.intersphinx",
Hynek Schlawack01c31672016-12-11 15:14:09 +010061]
Jonathan Ballet0646a242011-07-16 07:13:03 +090062
63# Add any paths that contain templates here, relative to this directory.
Alex Gaynor03737182020-07-23 20:40:46 -040064templates_path = ["_templates"]
Jonathan Ballet0646a242011-07-16 07:13:03 +090065
66# The suffix of source filenames.
Alex Gaynor03737182020-07-23 20:40:46 -040067source_suffix = ".rst"
Jonathan Ballet0646a242011-07-16 07:13:03 +090068
69# The encoding of source files.
Alex Gaynor03737182020-07-23 20:40:46 -040070# source_encoding = 'utf-8-sig'
Jonathan Ballet0646a242011-07-16 07:13:03 +090071
72# The master toctree document.
Alex Gaynor03737182020-07-23 20:40:46 -040073master_doc = "index"
Jonathan Ballet0646a242011-07-16 07:13:03 +090074
75# General information about the project.
Alex Gaynor03737182020-07-23 20:40:46 -040076project = u"pyOpenSSL"
Hynek Schlawack5bc17cb2015-04-30 19:21:40 +020077authors = u"The pyOpenSSL developers"
Hynek Schlawack01c31672016-12-11 15:14:09 +010078copyright = u"2001 " + authors
Jonathan Ballet0646a242011-07-16 07:13:03 +090079
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 Schlawack7b3aa902015-10-16 21:06:20 +020085version = find_version("..", "src", "OpenSSL", "version.py")
Jonathan Ballet0646a242011-07-16 07:13:03 +090086# The full version, including alpha/beta/rc tags.
Hynek Schlawack76ecf942015-04-14 11:09:44 -040087release = version
Jonathan Ballet0646a242011-07-16 07:13:03 +090088
89# The language for content autogenerated by Sphinx. Refer to documentation
90# for a list of supported languages.
Alex Gaynor03737182020-07-23 20:40:46 -040091# language = None
Jonathan Ballet0646a242011-07-16 07:13:03 +090092
93# There are two options for replacing |today|: either, you set today to some
94# non-false value, then it is used:
Alex Gaynor03737182020-07-23 20:40:46 -040095# today = ''
Jonathan Ballet0646a242011-07-16 07:13:03 +090096# Else, today_fmt is used as the format for a strftime call.
Alex Gaynor03737182020-07-23 20:40:46 -040097# today_fmt = '%B %d, %Y'
Jonathan Ballet0646a242011-07-16 07:13:03 +090098
99# List of patterns, relative to source directory, that match files and
100# directories to ignore when looking for source files.
Alex Gaynor03737182020-07-23 20:40:46 -0400101exclude_patterns = ["_build"]
Jonathan Ballet0646a242011-07-16 07:13:03 +0900102
103# The reST default role (used for this markup: `text`) to use for all documents.
Alex Gaynor03737182020-07-23 20:40:46 -0400104# default_role = None
Jonathan Ballet0646a242011-07-16 07:13:03 +0900105
106# If true, '()' will be appended to :func: etc. cross-reference text.
Alex Gaynor03737182020-07-23 20:40:46 -0400107# add_function_parentheses = True
Jonathan Ballet0646a242011-07-16 07:13:03 +0900108
109# If true, the current module name will be prepended to all description
110# unit titles (such as .. function::).
Alex Gaynor03737182020-07-23 20:40:46 -0400111# add_module_names = True
Jonathan Ballet0646a242011-07-16 07:13:03 +0900112
113# If true, sectionauthor and moduleauthor directives will be shown in the
114# output. They are ignored by default.
Alex Gaynor03737182020-07-23 20:40:46 -0400115# show_authors = False
Jonathan Ballet0646a242011-07-16 07:13:03 +0900116
117# The name of the Pygments (syntax highlighting) style to use.
Alex Gaynor03737182020-07-23 20:40:46 -0400118pygments_style = "sphinx"
Jonathan Ballet0646a242011-07-16 07:13:03 +0900119
120# A list of ignored prefixes for module index sorting.
Alex Gaynor03737182020-07-23 20:40:46 -0400121# modindex_common_prefix = []
Jonathan Ballet0646a242011-07-16 07:13:03 +0900122
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 Gaynor03737182020-07-23 20:40:46 -0400128on_rtd = os.environ.get("READTHEDOCS", None) == "True"
Hynek Schlawack76ed8e02015-05-28 14:40:11 +0200129
130if not on_rtd: # only import and set the theme if we're building docs locally
131 import sphinx_rtd_theme
Alex Gaynor03737182020-07-23 20:40:46 -0400132
133 html_theme = "sphinx_rtd_theme"
Hynek Schlawack76ed8e02015-05-28 14:40:11 +0200134 html_theme_path = [sphinx_rtd_theme.get_html_theme_path()]
Jonathan Ballet0646a242011-07-16 07:13:03 +0900135
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 Gaynor03737182020-07-23 20:40:46 -0400139# html_theme_options = {}
Jonathan Ballet0646a242011-07-16 07:13:03 +0900140
141# Add any paths that contain custom themes here, relative to this directory.
Alex Gaynor03737182020-07-23 20:40:46 -0400142# html_theme_path = []
Jonathan Ballet0646a242011-07-16 07:13:03 +0900143
144# The name for this set of Sphinx documents. If None, it defaults to
145# "<project> v<release> documentation".
Alex Gaynor03737182020-07-23 20:40:46 -0400146# html_title = None
Jonathan Ballet0646a242011-07-16 07:13:03 +0900147
148# A shorter title for the navigation bar. Default is the same as html_title.
Alex Gaynor03737182020-07-23 20:40:46 -0400149# html_short_title = None
Jonathan Ballet0646a242011-07-16 07:13:03 +0900150
151# The name of an image file (relative to this directory) to place at the top
152# of the sidebar.
Alex Gaynor03737182020-07-23 20:40:46 -0400153# html_logo = None
Jonathan Ballet0646a242011-07-16 07:13:03 +0900154
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 Gaynor03737182020-07-23 20:40:46 -0400158# html_favicon = None
Jonathan Ballet0646a242011-07-16 07:13:03 +0900159
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 Schlawack4202f0d2015-04-14 20:09:21 -0400163# html_static_path = ['_static']
Jonathan Ballet0646a242011-07-16 07:13:03 +0900164
165# If not '', a 'Last updated on:' timestamp is inserted at every page bottom,
166# using the given strftime format.
Alex Gaynor03737182020-07-23 20:40:46 -0400167# html_last_updated_fmt = '%b %d, %Y'
Jonathan Ballet0646a242011-07-16 07:13:03 +0900168
169# If true, SmartyPants will be used to convert quotes and dashes to
170# typographically correct entities.
Alex Gaynor03737182020-07-23 20:40:46 -0400171# html_use_smartypants = True
Jonathan Ballet0646a242011-07-16 07:13:03 +0900172
173# Custom sidebar templates, maps document names to template names.
Alex Gaynor03737182020-07-23 20:40:46 -0400174# html_sidebars = {}
Jonathan Ballet0646a242011-07-16 07:13:03 +0900175
176# Additional templates that should be rendered to pages, maps page names to
177# template names.
Alex Gaynor03737182020-07-23 20:40:46 -0400178# html_additional_pages = {}
Jonathan Ballet0646a242011-07-16 07:13:03 +0900179
180# If false, no module index is generated.
Alex Gaynor03737182020-07-23 20:40:46 -0400181# html_domain_indices = True
Jonathan Ballet0646a242011-07-16 07:13:03 +0900182
183# If false, no index is generated.
Alex Gaynor03737182020-07-23 20:40:46 -0400184# html_use_index = True
Jonathan Ballet0646a242011-07-16 07:13:03 +0900185
186# If true, the index is split into individual pages for each letter.
Alex Gaynor03737182020-07-23 20:40:46 -0400187# html_split_index = False
Jonathan Ballet0646a242011-07-16 07:13:03 +0900188
189# If true, links to the reST sources are added to the pages.
Alex Gaynor03737182020-07-23 20:40:46 -0400190# html_show_sourcelink = True
Jonathan Ballet0646a242011-07-16 07:13:03 +0900191
192# If true, "Created using Sphinx" is shown in the HTML footer. Default is True.
Alex Gaynor03737182020-07-23 20:40:46 -0400193# html_show_sphinx = True
Jonathan Ballet0646a242011-07-16 07:13:03 +0900194
195# If true, "(C) Copyright ..." is shown in the HTML footer. Default is True.
Alex Gaynor03737182020-07-23 20:40:46 -0400196# html_show_copyright = True
Jonathan Ballet0646a242011-07-16 07:13:03 +0900197
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 Gaynor03737182020-07-23 20:40:46 -0400201# html_use_opensearch = ''
Jonathan Ballet0646a242011-07-16 07:13:03 +0900202
203# This is the file name suffix for HTML files (e.g. ".xhtml").
Alex Gaynor03737182020-07-23 20:40:46 -0400204# html_file_suffix = None
Jonathan Ballet0646a242011-07-16 07:13:03 +0900205
206# Output file base name for HTML help builder.
Alex Gaynor03737182020-07-23 20:40:46 -0400207htmlhelp_basename = "pyOpenSSLdoc"
Jonathan Ballet0646a242011-07-16 07:13:03 +0900208
209
210# -- Options for LaTeX output --------------------------------------------------
211
212# The paper size ('letter' or 'a4').
Alex Gaynor03737182020-07-23 20:40:46 -0400213# latex_paper_size = 'letter'
Jonathan Ballet0646a242011-07-16 07:13:03 +0900214
215# The font size ('10pt', '11pt' or '12pt').
Alex Gaynor03737182020-07-23 20:40:46 -0400216# latex_font_size = '10pt'
Jonathan Ballet0646a242011-07-16 07:13:03 +0900217
218# Grouping the document tree into LaTeX files. List of tuples
219# (source start file, target name, title, author, documentclass [howto/manual]).
220latex_documents = [
Alex Gaynor03737182020-07-23 20:40:46 -0400221 ("index", "pyOpenSSL.tex", u"pyOpenSSL Documentation", authors, "manual"),
Jonathan Ballet0646a242011-07-16 07:13:03 +0900222]
223
224# The name of an image file (relative to this directory) to place at the top of
225# the title page.
Alex Gaynor03737182020-07-23 20:40:46 -0400226# latex_logo = None
Jonathan Ballet0646a242011-07-16 07:13:03 +0900227
228# For "manual" documents, if this is true, then toplevel headings are parts,
229# not chapters.
Alex Gaynor03737182020-07-23 20:40:46 -0400230# latex_use_parts = False
Jonathan Ballet0646a242011-07-16 07:13:03 +0900231
232# If true, show page references after internal links.
Alex Gaynor03737182020-07-23 20:40:46 -0400233# latex_show_pagerefs = False
Jonathan Ballet0646a242011-07-16 07:13:03 +0900234
235# If true, show URL addresses after external links.
Alex Gaynor03737182020-07-23 20:40:46 -0400236# latex_show_urls = False
Jonathan Ballet0646a242011-07-16 07:13:03 +0900237
238# Additional stuff for the LaTeX preamble.
Alex Gaynor03737182020-07-23 20:40:46 -0400239# latex_preamble = ''
Jonathan Ballet0646a242011-07-16 07:13:03 +0900240
241# Documents to append as an appendix to all manuals.
Alex Gaynor03737182020-07-23 20:40:46 -0400242# latex_appendices = []
Jonathan Ballet0646a242011-07-16 07:13:03 +0900243
244# If false, no module index is generated.
Alex Gaynor03737182020-07-23 20:40:46 -0400245# latex_domain_indices = True
Jonathan Ballet0646a242011-07-16 07:13:03 +0900246
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 Gaynor03737182020-07-23 20:40:46 -0400252man_pages = [("index", "pyopenssl", u"pyOpenSSL Documentation", [authors], 1)]
Hynek Schlawack01c31672016-12-11 15:14:09 +0100253
254intersphinx_mapping = {
255 "https://docs.python.org/3": None,
256 "https://cryptography.io/en/latest/": None,
257}