blob: dd8d0112456e7a3fde46f0ed6cb0baa4ba96392e [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#
Christian Claussac686812020-11-29 22:46:45 +01006# This file is execfile()d with the current directory set to its parent dir.
Jonathan Ballet0646a242011-07-16 07:13:03 +09007#
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 codecs
15import os
16import re
17import sys
18
19
20HERE = os.path.abspath(os.path.dirname(__file__))
21
22
23def read_file(*parts):
24 """
Alex Gaynorca87ff62015-09-04 23:31:03 -040025 Build an absolute path from *parts* and return the contents of the
Hynek Schlawack5bc17cb2015-04-30 19:21:40 +020026 resulting file. Assume UTF-8 encoding.
27 """
28 with codecs.open(os.path.join(HERE, *parts), "rb", "ascii") as f:
29 return f.read()
30
31
32def find_version(*file_paths):
33 version_file = read_file(*file_paths)
Alex Gaynor03737182020-07-23 20:40:46 -040034 version_match = re.search(
35 r"^__version__ = ['\"]([^'\"]*)['\"]", version_file, re.M
36 )
Hynek Schlawack5bc17cb2015-04-30 19:21:40 +020037 if version_match:
38 return version_match.group(1)
39 raise RuntimeError("Unable to find version string.")
40
Jonathan Ballet0646a242011-07-16 07:13:03 +090041
Jonathan Ballet648875f2011-07-16 14:14:58 +090042DOC_DIR = os.path.abspath(os.path.dirname(__file__))
43sys.path.insert(0, os.path.abspath(os.path.join(DOC_DIR, "..")))
44
Jonathan Ballet0646a242011-07-16 07:13:03 +090045# If extensions (or modules to document with autodoc) are in another directory,
46# add these directories to sys.path here. If the directory is relative to the
47# documentation root, use os.path.abspath to make it absolute, like shown here.
Alex Gaynor03737182020-07-23 20:40:46 -040048# sys.path.insert(0, os.path.abspath('.'))
Jonathan Ballet0646a242011-07-16 07:13:03 +090049
Christian Claussac686812020-11-29 22:46:45 +010050# -- General configuration ----------------------------------------------------
Jonathan Ballet0646a242011-07-16 07:13:03 +090051
52# If your documentation needs a minimal Sphinx version, state it here.
Alex Gaynor03737182020-07-23 20:40:46 -040053needs_sphinx = "1.0"
Jonathan Ballet0646a242011-07-16 07:13:03 +090054
Hynek Schlawack01c31672016-12-11 15:14:09 +010055# Add any Sphinx extension module names here, as strings. They can be
56# extensions coming with Sphinx (named 'sphinx.ext.*') or your custom ones.
57extensions = [
58 "sphinx.ext.autodoc",
Alex Gaynor03737182020-07-23 20:40:46 -040059 "sphinx.ext.intersphinx",
Hynek Schlawack01c31672016-12-11 15:14:09 +010060]
Jonathan Ballet0646a242011-07-16 07:13:03 +090061
62# Add any paths that contain templates here, relative to this directory.
Alex Gaynor03737182020-07-23 20:40:46 -040063templates_path = ["_templates"]
Jonathan Ballet0646a242011-07-16 07:13:03 +090064
65# The suffix of source filenames.
Alex Gaynor03737182020-07-23 20:40:46 -040066source_suffix = ".rst"
Jonathan Ballet0646a242011-07-16 07:13:03 +090067
68# The encoding of source files.
Alex Gaynor03737182020-07-23 20:40:46 -040069# source_encoding = 'utf-8-sig'
Jonathan Ballet0646a242011-07-16 07:13:03 +090070
71# The master toctree document.
Alex Gaynor03737182020-07-23 20:40:46 -040072master_doc = "index"
Jonathan Ballet0646a242011-07-16 07:13:03 +090073
74# General information about the project.
Alex Gaynor03737182020-07-23 20:40:46 -040075project = u"pyOpenSSL"
Hynek Schlawack5bc17cb2015-04-30 19:21:40 +020076authors = u"The pyOpenSSL developers"
Hynek Schlawack01c31672016-12-11 15:14:09 +010077copyright = u"2001 " + authors
Jonathan Ballet0646a242011-07-16 07:13:03 +090078
79# The version info for the project you're documenting, acts as replacement for
80# |version| and |release|, also used in various other places throughout the
81# built documents.
82#
83# The short X.Y version.
Hynek Schlawack7b3aa902015-10-16 21:06:20 +020084version = find_version("..", "src", "OpenSSL", "version.py")
Jonathan Ballet0646a242011-07-16 07:13:03 +090085# The full version, including alpha/beta/rc tags.
Hynek Schlawack76ecf942015-04-14 11:09:44 -040086release = version
Jonathan Ballet0646a242011-07-16 07:13:03 +090087
88# The language for content autogenerated by Sphinx. Refer to documentation
89# for a list of supported languages.
Alex Gaynor03737182020-07-23 20:40:46 -040090# language = None
Jonathan Ballet0646a242011-07-16 07:13:03 +090091
92# There are two options for replacing |today|: either, you set today to some
93# non-false value, then it is used:
Alex Gaynor03737182020-07-23 20:40:46 -040094# today = ''
Jonathan Ballet0646a242011-07-16 07:13:03 +090095# Else, today_fmt is used as the format for a strftime call.
Alex Gaynor03737182020-07-23 20:40:46 -040096# today_fmt = '%B %d, %Y'
Jonathan Ballet0646a242011-07-16 07:13:03 +090097
98# List of patterns, relative to source directory, that match files and
99# directories to ignore when looking for source files.
Alex Gaynor03737182020-07-23 20:40:46 -0400100exclude_patterns = ["_build"]
Jonathan Ballet0646a242011-07-16 07:13:03 +0900101
Christian Claussac686812020-11-29 22:46:45 +0100102# The reST default role (used for this markup `text`) to use for all documents.
Alex Gaynor03737182020-07-23 20:40:46 -0400103# default_role = None
Jonathan Ballet0646a242011-07-16 07:13:03 +0900104
105# If true, '()' will be appended to :func: etc. cross-reference text.
Alex Gaynor03737182020-07-23 20:40:46 -0400106# add_function_parentheses = True
Jonathan Ballet0646a242011-07-16 07:13:03 +0900107
108# If true, the current module name will be prepended to all description
109# unit titles (such as .. function::).
Alex Gaynor03737182020-07-23 20:40:46 -0400110# add_module_names = True
Jonathan Ballet0646a242011-07-16 07:13:03 +0900111
112# If true, sectionauthor and moduleauthor directives will be shown in the
113# output. They are ignored by default.
Alex Gaynor03737182020-07-23 20:40:46 -0400114# show_authors = False
Jonathan Ballet0646a242011-07-16 07:13:03 +0900115
116# The name of the Pygments (syntax highlighting) style to use.
Alex Gaynor03737182020-07-23 20:40:46 -0400117pygments_style = "sphinx"
Jonathan Ballet0646a242011-07-16 07:13:03 +0900118
119# A list of ignored prefixes for module index sorting.
Alex Gaynor03737182020-07-23 20:40:46 -0400120# modindex_common_prefix = []
Jonathan Ballet0646a242011-07-16 07:13:03 +0900121
122
Christian Claussac686812020-11-29 22:46:45 +0100123# -- Options for HTML output --------------------------------------------------
Jonathan Ballet0646a242011-07-16 07:13:03 +0900124
125# The theme to use for HTML and HTML Help pages. See the documentation for
126# a list of builtin themes.
Alex Gaynor03737182020-07-23 20:40:46 -0400127on_rtd = os.environ.get("READTHEDOCS", None) == "True"
Hynek Schlawack76ed8e02015-05-28 14:40:11 +0200128
129if not on_rtd: # only import and set the theme if we're building docs locally
130 import sphinx_rtd_theme
Alex Gaynor03737182020-07-23 20:40:46 -0400131
132 html_theme = "sphinx_rtd_theme"
Hynek Schlawack76ed8e02015-05-28 14:40:11 +0200133 html_theme_path = [sphinx_rtd_theme.get_html_theme_path()]
Jonathan Ballet0646a242011-07-16 07:13:03 +0900134
135# Theme options are theme-specific and customize the look and feel of a theme
136# further. For a list of options available for each theme, see the
137# documentation.
Alex Gaynor03737182020-07-23 20:40:46 -0400138# html_theme_options = {}
Jonathan Ballet0646a242011-07-16 07:13:03 +0900139
140# Add any paths that contain custom themes here, relative to this directory.
Alex Gaynor03737182020-07-23 20:40:46 -0400141# html_theme_path = []
Jonathan Ballet0646a242011-07-16 07:13:03 +0900142
143# The name for this set of Sphinx documents. If None, it defaults to
144# "<project> v<release> documentation".
Alex Gaynor03737182020-07-23 20:40:46 -0400145# html_title = None
Jonathan Ballet0646a242011-07-16 07:13:03 +0900146
147# A shorter title for the navigation bar. Default is the same as html_title.
Alex Gaynor03737182020-07-23 20:40:46 -0400148# html_short_title = None
Jonathan Ballet0646a242011-07-16 07:13:03 +0900149
150# The name of an image file (relative to this directory) to place at the top
151# of the sidebar.
Alex Gaynor03737182020-07-23 20:40:46 -0400152# html_logo = None
Jonathan Ballet0646a242011-07-16 07:13:03 +0900153
154# The name of an image file (within the static path) to use as favicon of the
155# docs. This file should be a Windows icon file (.ico) being 16x16 or 32x32
156# pixels large.
Alex Gaynor03737182020-07-23 20:40:46 -0400157# html_favicon = None
Jonathan Ballet0646a242011-07-16 07:13:03 +0900158
159# Add any paths that contain custom static files (such as style sheets) here,
160# relative to this directory. They are copied after the builtin static files,
161# so a file named "default.css" will overwrite the builtin "default.css".
Hynek Schlawack4202f0d2015-04-14 20:09:21 -0400162# html_static_path = ['_static']
Jonathan Ballet0646a242011-07-16 07:13:03 +0900163
164# If not '', a 'Last updated on:' timestamp is inserted at every page bottom,
165# using the given strftime format.
Alex Gaynor03737182020-07-23 20:40:46 -0400166# html_last_updated_fmt = '%b %d, %Y'
Jonathan Ballet0646a242011-07-16 07:13:03 +0900167
168# If true, SmartyPants will be used to convert quotes and dashes to
169# typographically correct entities.
Alex Gaynor03737182020-07-23 20:40:46 -0400170# html_use_smartypants = True
Jonathan Ballet0646a242011-07-16 07:13:03 +0900171
172# Custom sidebar templates, maps document names to template names.
Alex Gaynor03737182020-07-23 20:40:46 -0400173# html_sidebars = {}
Jonathan Ballet0646a242011-07-16 07:13:03 +0900174
175# Additional templates that should be rendered to pages, maps page names to
176# template names.
Alex Gaynor03737182020-07-23 20:40:46 -0400177# html_additional_pages = {}
Jonathan Ballet0646a242011-07-16 07:13:03 +0900178
179# If false, no module index is generated.
Alex Gaynor03737182020-07-23 20:40:46 -0400180# html_domain_indices = True
Jonathan Ballet0646a242011-07-16 07:13:03 +0900181
182# If false, no index is generated.
Alex Gaynor03737182020-07-23 20:40:46 -0400183# html_use_index = True
Jonathan Ballet0646a242011-07-16 07:13:03 +0900184
185# If true, the index is split into individual pages for each letter.
Alex Gaynor03737182020-07-23 20:40:46 -0400186# html_split_index = False
Jonathan Ballet0646a242011-07-16 07:13:03 +0900187
188# If true, links to the reST sources are added to the pages.
Alex Gaynor03737182020-07-23 20:40:46 -0400189# html_show_sourcelink = True
Jonathan Ballet0646a242011-07-16 07:13:03 +0900190
191# If true, "Created using Sphinx" is shown in the HTML footer. Default is True.
Alex Gaynor03737182020-07-23 20:40:46 -0400192# html_show_sphinx = True
Jonathan Ballet0646a242011-07-16 07:13:03 +0900193
194# If true, "(C) Copyright ..." is shown in the HTML footer. Default is True.
Alex Gaynor03737182020-07-23 20:40:46 -0400195# html_show_copyright = True
Jonathan Ballet0646a242011-07-16 07:13:03 +0900196
197# If true, an OpenSearch description file will be output, and all pages will
198# contain a <link> tag referring to it. The value of this option must be the
199# base URL from which the finished HTML is served.
Alex Gaynor03737182020-07-23 20:40:46 -0400200# html_use_opensearch = ''
Jonathan Ballet0646a242011-07-16 07:13:03 +0900201
202# This is the file name suffix for HTML files (e.g. ".xhtml").
Alex Gaynor03737182020-07-23 20:40:46 -0400203# html_file_suffix = None
Jonathan Ballet0646a242011-07-16 07:13:03 +0900204
205# Output file base name for HTML help builder.
Alex Gaynor03737182020-07-23 20:40:46 -0400206htmlhelp_basename = "pyOpenSSLdoc"
Jonathan Ballet0646a242011-07-16 07:13:03 +0900207
208
Christian Claussac686812020-11-29 22:46:45 +0100209# -- Options for LaTeX output -------------------------------------------------
Jonathan Ballet0646a242011-07-16 07:13:03 +0900210
211# The paper size ('letter' or 'a4').
Alex Gaynor03737182020-07-23 20:40:46 -0400212# latex_paper_size = 'letter'
Jonathan Ballet0646a242011-07-16 07:13:03 +0900213
214# The font size ('10pt', '11pt' or '12pt').
Alex Gaynor03737182020-07-23 20:40:46 -0400215# latex_font_size = '10pt'
Jonathan Ballet0646a242011-07-16 07:13:03 +0900216
217# Grouping the document tree into LaTeX files. List of tuples
Christian Claussac686812020-11-29 22:46:45 +0100218# (source start file, target name, title, author, documentclass [howto/manual])
Jonathan Ballet0646a242011-07-16 07:13:03 +0900219latex_documents = [
Alex Gaynor03737182020-07-23 20:40:46 -0400220 ("index", "pyOpenSSL.tex", u"pyOpenSSL Documentation", authors, "manual"),
Jonathan Ballet0646a242011-07-16 07:13:03 +0900221]
222
223# The name of an image file (relative to this directory) to place at the top of
224# the title page.
Alex Gaynor03737182020-07-23 20:40:46 -0400225# latex_logo = None
Jonathan Ballet0646a242011-07-16 07:13:03 +0900226
227# For "manual" documents, if this is true, then toplevel headings are parts,
228# not chapters.
Alex Gaynor03737182020-07-23 20:40:46 -0400229# latex_use_parts = False
Jonathan Ballet0646a242011-07-16 07:13:03 +0900230
231# If true, show page references after internal links.
Alex Gaynor03737182020-07-23 20:40:46 -0400232# latex_show_pagerefs = False
Jonathan Ballet0646a242011-07-16 07:13:03 +0900233
234# If true, show URL addresses after external links.
Alex Gaynor03737182020-07-23 20:40:46 -0400235# latex_show_urls = False
Jonathan Ballet0646a242011-07-16 07:13:03 +0900236
237# Additional stuff for the LaTeX preamble.
Alex Gaynor03737182020-07-23 20:40:46 -0400238# latex_preamble = ''
Jonathan Ballet0646a242011-07-16 07:13:03 +0900239
240# Documents to append as an appendix to all manuals.
Alex Gaynor03737182020-07-23 20:40:46 -0400241# latex_appendices = []
Jonathan Ballet0646a242011-07-16 07:13:03 +0900242
243# If false, no module index is generated.
Alex Gaynor03737182020-07-23 20:40:46 -0400244# latex_domain_indices = True
Jonathan Ballet0646a242011-07-16 07:13:03 +0900245
246
Christian Claussac686812020-11-29 22:46:45 +0100247# -- Options for manual page output -------------------------------------------
Jonathan Ballet0646a242011-07-16 07:13:03 +0900248
249# One entry per manual page. List of tuples
250# (source start file, name, description, authors, manual section).
Alex Gaynor03737182020-07-23 20:40:46 -0400251man_pages = [("index", "pyopenssl", u"pyOpenSSL Documentation", [authors], 1)]
Hynek Schlawack01c31672016-12-11 15:14:09 +0100252
253intersphinx_mapping = {
254 "https://docs.python.org/3": None,
255 "https://cryptography.io/en/latest/": None,
256}