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