blob: 7d0fe9cc4533dc1ad42ae89860c77c1247a72634 [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)
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
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.
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.
Jonathan Ballet9dc218a2011-07-24 10:14:12 +090053needs_sphinx = '1.0'
Jonathan Ballet0646a242011-07-16 07:13:03 +090054
55# Add any Sphinx extension module names here, as strings. They can be extensions
56# coming with Sphinx (named 'sphinx.ext.*') or your custom ones.
Laurens Van Houtvenc105a552014-06-17 15:31:46 +020057extensions = ["sphinx.ext.autodoc"]
Jonathan Ballet0646a242011-07-16 07:13:03 +090058
59# Add any paths that contain templates here, relative to this directory.
60templates_path = ['_templates']
61
62# The suffix of source filenames.
63source_suffix = '.rst'
64
65# The encoding of source files.
66#source_encoding = 'utf-8-sig'
67
68# The master toctree document.
69master_doc = 'index'
70
71# General information about the project.
72project = u'pyOpenSSL'
Hynek Schlawack5bc17cb2015-04-30 19:21:40 +020073authors = u"The pyOpenSSL developers"
74copyright = u"2001-{0}, {1}".format(datetime.date.today().year, authors)
Jonathan Ballet0646a242011-07-16 07:13:03 +090075
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#
80# The short X.Y version.
Hynek Schlawack5bc17cb2015-04-30 19:21:40 +020081version = find_version("../OpenSSL/version.py")
Jonathan Ballet0646a242011-07-16 07:13:03 +090082# The full version, including alpha/beta/rc tags.
Hynek Schlawack76ecf942015-04-14 11:09:44 -040083release = version
Jonathan Ballet0646a242011-07-16 07:13:03 +090084
85# The language for content autogenerated by Sphinx. Refer to documentation
86# for a list of supported languages.
87#language = None
88
89# There are two options for replacing |today|: either, you set today to some
90# non-false value, then it is used:
91#today = ''
92# Else, today_fmt is used as the format for a strftime call.
93#today_fmt = '%B %d, %Y'
94
95# List of patterns, relative to source directory, that match files and
96# directories to ignore when looking for source files.
97exclude_patterns = ['_build']
98
99# The reST default role (used for this markup: `text`) to use for all documents.
100#default_role = None
101
102# If true, '()' will be appended to :func: etc. cross-reference text.
103#add_function_parentheses = True
104
105# If true, the current module name will be prepended to all description
106# unit titles (such as .. function::).
107#add_module_names = True
108
109# If true, sectionauthor and moduleauthor directives will be shown in the
110# output. They are ignored by default.
111#show_authors = False
112
113# The name of the Pygments (syntax highlighting) style to use.
114pygments_style = 'sphinx'
115
116# A list of ignored prefixes for module index sorting.
117#modindex_common_prefix = []
118
119
120# -- Options for HTML output ---------------------------------------------------
121
122# The theme to use for HTML and HTML Help pages. See the documentation for
123# a list of builtin themes.
Hynek Schlawack76ed8e02015-05-28 14:40:11 +0200124on_rtd = os.environ.get('READTHEDOCS', None) == 'True'
125
126if not on_rtd: # only import and set the theme if we're building docs locally
127 import sphinx_rtd_theme
128 html_theme = 'sphinx_rtd_theme'
129 html_theme_path = [sphinx_rtd_theme.get_html_theme_path()]
Jonathan Ballet0646a242011-07-16 07:13:03 +0900130
131# Theme options are theme-specific and customize the look and feel of a theme
132# further. For a list of options available for each theme, see the
133# documentation.
134#html_theme_options = {}
135
136# Add any paths that contain custom themes here, relative to this directory.
137#html_theme_path = []
138
139# The name for this set of Sphinx documents. If None, it defaults to
140# "<project> v<release> documentation".
141#html_title = None
142
143# A shorter title for the navigation bar. Default is the same as html_title.
144#html_short_title = None
145
146# The name of an image file (relative to this directory) to place at the top
147# of the sidebar.
148#html_logo = None
149
150# The name of an image file (within the static path) to use as favicon of the
151# docs. This file should be a Windows icon file (.ico) being 16x16 or 32x32
152# pixels large.
153#html_favicon = None
154
155# Add any paths that contain custom static files (such as style sheets) here,
156# relative to this directory. They are copied after the builtin static files,
157# so a file named "default.css" will overwrite the builtin "default.css".
Hynek Schlawack4202f0d2015-04-14 20:09:21 -0400158# html_static_path = ['_static']
Jonathan Ballet0646a242011-07-16 07:13:03 +0900159
160# If not '', a 'Last updated on:' timestamp is inserted at every page bottom,
161# using the given strftime format.
162#html_last_updated_fmt = '%b %d, %Y'
163
164# If true, SmartyPants will be used to convert quotes and dashes to
165# typographically correct entities.
166#html_use_smartypants = True
167
168# Custom sidebar templates, maps document names to template names.
169#html_sidebars = {}
170
171# Additional templates that should be rendered to pages, maps page names to
172# template names.
173#html_additional_pages = {}
174
175# If false, no module index is generated.
176#html_domain_indices = True
177
178# If false, no index is generated.
179#html_use_index = True
180
181# If true, the index is split into individual pages for each letter.
182#html_split_index = False
183
184# If true, links to the reST sources are added to the pages.
185#html_show_sourcelink = True
186
187# If true, "Created using Sphinx" is shown in the HTML footer. Default is True.
188#html_show_sphinx = True
189
190# If true, "(C) Copyright ..." is shown in the HTML footer. Default is True.
191#html_show_copyright = True
192
193# If true, an OpenSearch description file will be output, and all pages will
194# contain a <link> tag referring to it. The value of this option must be the
195# base URL from which the finished HTML is served.
196#html_use_opensearch = ''
197
198# This is the file name suffix for HTML files (e.g. ".xhtml").
199#html_file_suffix = None
200
201# Output file base name for HTML help builder.
202htmlhelp_basename = 'pyOpenSSLdoc'
203
204
205# -- Options for LaTeX output --------------------------------------------------
206
207# The paper size ('letter' or 'a4').
208#latex_paper_size = 'letter'
209
210# The font size ('10pt', '11pt' or '12pt').
211#latex_font_size = '10pt'
212
213# Grouping the document tree into LaTeX files. List of tuples
214# (source start file, target name, title, author, documentclass [howto/manual]).
215latex_documents = [
216 ('index', 'pyOpenSSL.tex', u'pyOpenSSL Documentation',
Hynek Schlawack5bc17cb2015-04-30 19:21:40 +0200217 authors, 'manual'),
Jonathan Ballet0646a242011-07-16 07:13:03 +0900218]
219
220# The name of an image file (relative to this directory) to place at the top of
221# the title page.
222#latex_logo = None
223
224# For "manual" documents, if this is true, then toplevel headings are parts,
225# not chapters.
226#latex_use_parts = False
227
228# If true, show page references after internal links.
229#latex_show_pagerefs = False
230
231# If true, show URL addresses after external links.
232#latex_show_urls = False
233
234# Additional stuff for the LaTeX preamble.
235#latex_preamble = ''
236
237# Documents to append as an appendix to all manuals.
238#latex_appendices = []
239
240# If false, no module index is generated.
241#latex_domain_indices = True
242
243
244# -- Options for manual page output --------------------------------------------
245
246# One entry per manual page. List of tuples
247# (source start file, name, description, authors, manual section).
248man_pages = [
249 ('index', 'pyopenssl', u'pyOpenSSL Documentation',
Hynek Schlawack5bc17cb2015-04-30 19:21:40 +0200250 [authors], 1)
Jonathan Ballet0646a242011-07-16 07:13:03 +0900251]