xref: /netbsd-src/external/mit/libuv/dist/docs/src/conf.py (revision 0e552da7216834a96e91ad098e59272b41087480)
1*0e552da7Schristos# -*- coding: utf-8 -*-
2*0e552da7Schristos#
3*0e552da7Schristos# libuv documentation documentation build configuration file, created by
4*0e552da7Schristos# sphinx-quickstart on Sun Jul 27 11:47:51 2014.
5*0e552da7Schristos#
6*0e552da7Schristos# This file is execfile()d with the current directory set to its
7*0e552da7Schristos# containing dir.
8*0e552da7Schristos#
9*0e552da7Schristos# Note that not all possible configuration values are present in this
10*0e552da7Schristos# autogenerated file.
11*0e552da7Schristos#
12*0e552da7Schristos# All configuration values have a default; values that are commented out
13*0e552da7Schristos# serve to show the default.
14*0e552da7Schristos
15*0e552da7Schristosimport os
16*0e552da7Schristosimport re
17*0e552da7Schristosimport sys
18*0e552da7Schristos
19*0e552da7Schristos
20*0e552da7Schristosdef get_libuv_version():
21*0e552da7Schristos    with open('../../include/uv/version.h') as f:
22*0e552da7Schristos        data = f.read()
23*0e552da7Schristos    try:
24*0e552da7Schristos        m = re.search(r"""^#define UV_VERSION_MAJOR (\d+)$""", data, re.MULTILINE)
25*0e552da7Schristos        major = int(m.group(1))
26*0e552da7Schristos        m = re.search(r"""^#define UV_VERSION_MINOR (\d+)$""", data, re.MULTILINE)
27*0e552da7Schristos        minor = int(m.group(1))
28*0e552da7Schristos        m = re.search(r"""^#define UV_VERSION_PATCH (\d+)$""", data, re.MULTILINE)
29*0e552da7Schristos        patch = int(m.group(1))
30*0e552da7Schristos        m = re.search(r"""^#define UV_VERSION_IS_RELEASE (\d)$""", data, re.MULTILINE)
31*0e552da7Schristos        is_release = int(m.group(1))
32*0e552da7Schristos        m = re.search(r"""^#define UV_VERSION_SUFFIX \"(\w*)\"$""", data, re.MULTILINE)
33*0e552da7Schristos        suffix = m.group(1)
34*0e552da7Schristos        return '%d.%d.%d%s' % (major, minor, patch, '-%s' % suffix if not is_release else '')
35*0e552da7Schristos    except Exception:
36*0e552da7Schristos        return 'unknown'
37*0e552da7Schristos
38*0e552da7Schristos# If extensions (or modules to document with autodoc) are in another directory,
39*0e552da7Schristos# add these directories to sys.path here. If the directory is relative to the
40*0e552da7Schristos# documentation root, use os.path.abspath to make it absolute, like shown here.
41*0e552da7Schristossys.path.insert(0, os.path.abspath('sphinx-plugins'))
42*0e552da7Schristos
43*0e552da7Schristos# -- General configuration ------------------------------------------------
44*0e552da7Schristos
45*0e552da7Schristos# If your documentation needs a minimal Sphinx version, state it here.
46*0e552da7Schristos#needs_sphinx = '1.0'
47*0e552da7Schristos
48*0e552da7Schristos# Add any Sphinx extension module names here, as strings. They can be
49*0e552da7Schristos# extensions coming with Sphinx (named 'sphinx.ext.*') or your custom
50*0e552da7Schristos# ones.
51*0e552da7Schristosextensions = ['manpage']
52*0e552da7Schristos
53*0e552da7Schristos# Add any paths that contain templates here, relative to this directory.
54*0e552da7Schristostemplates_path = ['templates']
55*0e552da7Schristos
56*0e552da7Schristos# The suffix of source filenames.
57*0e552da7Schristossource_suffix = '.rst'
58*0e552da7Schristos
59*0e552da7Schristos# The encoding of source files.
60*0e552da7Schristos#source_encoding = 'utf-8-sig'
61*0e552da7Schristos
62*0e552da7Schristos# The master toctree document.
63*0e552da7Schristosmaster_doc = 'index'
64*0e552da7Schristos
65*0e552da7Schristos# General information about the project.
66*0e552da7Schristosproject = u'libuv API documentation'
67*0e552da7Schristoscopyright = u'2014-present, libuv contributors'
68*0e552da7Schristos
69*0e552da7Schristos# The version info for the project you're documenting, acts as replacement for
70*0e552da7Schristos# |version| and |release|, also used in various other places throughout the
71*0e552da7Schristos# built documents.
72*0e552da7Schristos#
73*0e552da7Schristos# The short X.Y version.
74*0e552da7Schristosversion = get_libuv_version()
75*0e552da7Schristos# The full version, including alpha/beta/rc tags.
76*0e552da7Schristosrelease = version
77*0e552da7Schristos
78*0e552da7Schristos# The language for content autogenerated by Sphinx. Refer to documentation
79*0e552da7Schristos# for a list of supported languages.
80*0e552da7Schristos#language = None
81*0e552da7Schristos
82*0e552da7Schristos# There are two options for replacing |today|: either, you set today to some
83*0e552da7Schristos# non-false value, then it is used:
84*0e552da7Schristos#today = ''
85*0e552da7Schristos# Else, today_fmt is used as the format for a strftime call.
86*0e552da7Schristos#today_fmt = '%B %d, %Y'
87*0e552da7Schristos
88*0e552da7Schristos# List of patterns, relative to source directory, that match files and
89*0e552da7Schristos# directories to ignore when looking for source files.
90*0e552da7Schristosexclude_patterns = []
91*0e552da7Schristos
92*0e552da7Schristos# The reST default role (used for this markup: `text`) to use for all
93*0e552da7Schristos# documents.
94*0e552da7Schristos#default_role = None
95*0e552da7Schristos
96*0e552da7Schristos# If true, '()' will be appended to :func: etc. cross-reference text.
97*0e552da7Schristos#add_function_parentheses = True
98*0e552da7Schristos
99*0e552da7Schristos# If true, the current module name will be prepended to all description
100*0e552da7Schristos# unit titles (such as .. function::).
101*0e552da7Schristos#add_module_names = True
102*0e552da7Schristos
103*0e552da7Schristos# If true, sectionauthor and moduleauthor directives will be shown in the
104*0e552da7Schristos# output. They are ignored by default.
105*0e552da7Schristos#show_authors = False
106*0e552da7Schristos
107*0e552da7Schristos# The name of the Pygments (syntax highlighting) style to use.
108*0e552da7Schristospygments_style = 'sphinx'
109*0e552da7Schristos
110*0e552da7Schristos# A list of ignored prefixes for module index sorting.
111*0e552da7Schristos#modindex_common_prefix = []
112*0e552da7Schristos
113*0e552da7Schristos# If true, keep warnings as "system message" paragraphs in the built documents.
114*0e552da7Schristos#keep_warnings = False
115*0e552da7Schristos
116*0e552da7Schristos
117*0e552da7Schristos# -- Options for HTML output ----------------------------------------------
118*0e552da7Schristos
119*0e552da7Schristos# The theme to use for HTML and HTML Help pages.  See the documentation for
120*0e552da7Schristos# a list of builtin themes.
121*0e552da7Schristoshtml_theme = 'nature'
122*0e552da7Schristos
123*0e552da7Schristos# Theme options are theme-specific and customize the look and feel of a theme
124*0e552da7Schristos# further.  For a list of options available for each theme, see the
125*0e552da7Schristos# documentation.
126*0e552da7Schristos#html_theme_options = {}
127*0e552da7Schristos
128*0e552da7Schristos# Add any paths that contain custom themes here, relative to this directory.
129*0e552da7Schristos#html_theme_path = []
130*0e552da7Schristos
131*0e552da7Schristos# The name for this set of Sphinx documents.  If None, it defaults to
132*0e552da7Schristos# "<project> v<release> documentation".
133*0e552da7Schristoshtml_title = 'libuv documentation'
134*0e552da7Schristos
135*0e552da7Schristos# A shorter title for the navigation bar.  Default is the same as html_title.
136*0e552da7Schristoshtml_short_title = 'libuv %s documentation' % version
137*0e552da7Schristos
138*0e552da7Schristos# The name of an image file (relative to this directory) to place at the top
139*0e552da7Schristos# of the sidebar.
140*0e552da7Schristoshtml_logo = 'static/logo.png'
141*0e552da7Schristos
142*0e552da7Schristos# The name of an image file (within the static path) to use as favicon of the
143*0e552da7Schristos# docs.  This file should be a Windows icon file (.ico) being 16x16 or 32x32
144*0e552da7Schristos# pixels large.
145*0e552da7Schristoshtml_favicon = 'static/favicon.ico'
146*0e552da7Schristos
147*0e552da7Schristos# Add any paths that contain custom static files (such as style sheets) here,
148*0e552da7Schristos# relative to this directory. They are copied after the builtin static files,
149*0e552da7Schristos# so a file named "default.css" will overwrite the builtin "default.css".
150*0e552da7Schristoshtml_static_path = ['static']
151*0e552da7Schristos
152*0e552da7Schristos# Add any extra paths that contain custom files (such as robots.txt or
153*0e552da7Schristos# .htaccess) here, relative to this directory. These files are copied
154*0e552da7Schristos# directly to the root of the documentation.
155*0e552da7Schristos#html_extra_path = []
156*0e552da7Schristos
157*0e552da7Schristos# If not '', a 'Last updated on:' timestamp is inserted at every page bottom,
158*0e552da7Schristos# using the given strftime format.
159*0e552da7Schristos#html_last_updated_fmt = '%b %d, %Y'
160*0e552da7Schristos
161*0e552da7Schristos# If true, SmartyPants will be used to convert quotes and dashes to
162*0e552da7Schristos# typographically correct entities.
163*0e552da7Schristos#html_use_smartypants = True
164*0e552da7Schristos
165*0e552da7Schristos# Custom sidebar templates, maps document names to template names.
166*0e552da7Schristos#html_sidebars = {}
167*0e552da7Schristos
168*0e552da7Schristos# Additional templates that should be rendered to pages, maps page names to
169*0e552da7Schristos# template names.
170*0e552da7Schristos#html_additional_pages = {}
171*0e552da7Schristos
172*0e552da7Schristos# If false, no module index is generated.
173*0e552da7Schristos#html_domain_indices = True
174*0e552da7Schristos
175*0e552da7Schristos# If false, no index is generated.
176*0e552da7Schristos#html_use_index = True
177*0e552da7Schristos
178*0e552da7Schristos# If true, the index is split into individual pages for each letter.
179*0e552da7Schristos#html_split_index = False
180*0e552da7Schristos
181*0e552da7Schristos# If true, links to the reST sources are added to the pages.
182*0e552da7Schristos#html_show_sourcelink = True
183*0e552da7Schristos
184*0e552da7Schristos# If true, "Created using Sphinx" is shown in the HTML footer. Default is True.
185*0e552da7Schristos#html_show_sphinx = True
186*0e552da7Schristos
187*0e552da7Schristos# If true, "(C) Copyright ..." is shown in the HTML footer. Default is True.
188*0e552da7Schristos#html_show_copyright = True
189*0e552da7Schristos
190*0e552da7Schristos# If true, an OpenSearch description file will be output, and all pages will
191*0e552da7Schristos# contain a <link> tag referring to it.  The value of this option must be the
192*0e552da7Schristos# base URL from which the finished HTML is served.
193*0e552da7Schristos#html_use_opensearch = ''
194*0e552da7Schristos
195*0e552da7Schristos# This is the file name suffix for HTML files (e.g. ".xhtml").
196*0e552da7Schristos#html_file_suffix = None
197*0e552da7Schristos
198*0e552da7Schristos# Output file base name for HTML help builder.
199*0e552da7Schristoshtmlhelp_basename = 'libuv'
200*0e552da7Schristos
201*0e552da7Schristos
202*0e552da7Schristos# -- Options for LaTeX output ---------------------------------------------
203*0e552da7Schristos
204*0e552da7Schristoslatex_elements = {
205*0e552da7Schristos# The paper size ('letterpaper' or 'a4paper').
206*0e552da7Schristos#'papersize': 'letterpaper',
207*0e552da7Schristos
208*0e552da7Schristos# The font size ('10pt', '11pt' or '12pt').
209*0e552da7Schristos#'pointsize': '10pt',
210*0e552da7Schristos
211*0e552da7Schristos# Additional stuff for the LaTeX preamble.
212*0e552da7Schristos#'preamble': '',
213*0e552da7Schristos}
214*0e552da7Schristos
215*0e552da7Schristos# Grouping the document tree into LaTeX files. List of tuples
216*0e552da7Schristos# (source start file, target name, title,
217*0e552da7Schristos#  author, documentclass [howto, manual, or own class]).
218*0e552da7Schristoslatex_documents = [
219*0e552da7Schristos  ('index', 'libuv.tex', u'libuv documentation',
220*0e552da7Schristos   u'libuv contributors', 'manual'),
221*0e552da7Schristos]
222*0e552da7Schristos
223*0e552da7Schristos# The name of an image file (relative to this directory) to place at the top of
224*0e552da7Schristos# the title page.
225*0e552da7Schristos#latex_logo = None
226*0e552da7Schristos
227*0e552da7Schristos# For "manual" documents, if this is true, then toplevel headings are parts,
228*0e552da7Schristos# not chapters.
229*0e552da7Schristos#latex_use_parts = False
230*0e552da7Schristos
231*0e552da7Schristos# If true, show page references after internal links.
232*0e552da7Schristos#latex_show_pagerefs = False
233*0e552da7Schristos
234*0e552da7Schristos# If true, show URL addresses after external links.
235*0e552da7Schristos#latex_show_urls = False
236*0e552da7Schristos
237*0e552da7Schristos# Documents to append as an appendix to all manuals.
238*0e552da7Schristos#latex_appendices = []
239*0e552da7Schristos
240*0e552da7Schristos# If false, no module index is generated.
241*0e552da7Schristos#latex_domain_indices = True
242*0e552da7Schristos
243*0e552da7Schristos
244*0e552da7Schristos# -- Options for manual page output ---------------------------------------
245*0e552da7Schristos
246*0e552da7Schristos# One entry per manual page. List of tuples
247*0e552da7Schristos# (source start file, name, description, authors, manual section).
248*0e552da7Schristosman_pages = [
249*0e552da7Schristos    ('index', 'libuv', u'libuv documentation',
250*0e552da7Schristos     [u'libuv contributors'], 1)
251*0e552da7Schristos]
252*0e552da7Schristos
253*0e552da7Schristos# If true, show URL addresses after external links.
254*0e552da7Schristos#man_show_urls = False
255*0e552da7Schristos
256*0e552da7Schristos
257*0e552da7Schristos# -- Options for Texinfo output -------------------------------------------
258*0e552da7Schristos
259*0e552da7Schristos# Grouping the document tree into Texinfo files. List of tuples
260*0e552da7Schristos# (source start file, target name, title, author,
261*0e552da7Schristos#  dir menu entry, description, category)
262*0e552da7Schristostexinfo_documents = [
263*0e552da7Schristos  ('index', 'libuv', u'libuv documentation',
264*0e552da7Schristos   u'libuv contributors', 'libuv', 'Cross-platform asynchronous I/O',
265*0e552da7Schristos   'Miscellaneous'),
266*0e552da7Schristos]
267*0e552da7Schristos
268*0e552da7Schristos# Documents to append as an appendix to all manuals.
269*0e552da7Schristos#texinfo_appendices = []
270*0e552da7Schristos
271*0e552da7Schristos# If false, no module index is generated.
272*0e552da7Schristos#texinfo_domain_indices = True
273*0e552da7Schristos
274*0e552da7Schristos# How to display URL addresses: 'footnote', 'no', or 'inline'.
275*0e552da7Schristos#texinfo_show_urls = 'footnote'
276*0e552da7Schristos
277*0e552da7Schristos# If true, do not generate a @detailmenu in the "Top" node's menu.
278*0e552da7Schristos#texinfo_no_detailmenu = False
279*0e552da7Schristos
280*0e552da7Schristos
281*0e552da7Schristos# -- Options for Epub output ----------------------------------------------
282*0e552da7Schristos
283*0e552da7Schristos# Bibliographic Dublin Core info.
284*0e552da7Schristosepub_title = u'libuv documentation'
285*0e552da7Schristosepub_author = u'libuv contributors'
286*0e552da7Schristosepub_publisher = u'libuv contributors'
287*0e552da7Schristosepub_copyright = u'2014-present, libuv contributors'
288*0e552da7Schristos
289*0e552da7Schristos# The basename for the epub file. It defaults to the project name.
290*0e552da7Schristosepub_basename = u'libuv'
291*0e552da7Schristos
292*0e552da7Schristos# The HTML theme for the epub output. Since the default themes are not optimized
293*0e552da7Schristos# for small screen space, using the same theme for HTML and epub output is
294*0e552da7Schristos# usually not wise. This defaults to 'epub', a theme designed to save visual
295*0e552da7Schristos# space.
296*0e552da7Schristos#epub_theme = 'epub'
297*0e552da7Schristos
298*0e552da7Schristos# The language of the text. It defaults to the language option
299*0e552da7Schristos# or en if the language is not set.
300*0e552da7Schristos#epub_language = ''
301*0e552da7Schristos
302*0e552da7Schristos# The scheme of the identifier. Typical schemes are ISBN or URL.
303*0e552da7Schristos#epub_scheme = ''
304*0e552da7Schristos
305*0e552da7Schristos# The unique identifier of the text. This can be a ISBN number
306*0e552da7Schristos# or the project homepage.
307*0e552da7Schristos#epub_identifier = ''
308*0e552da7Schristos
309*0e552da7Schristos# A unique identification for the text.
310*0e552da7Schristos#epub_uid = ''
311*0e552da7Schristos
312*0e552da7Schristos# A tuple containing the cover image and cover page html template filenames.
313*0e552da7Schristos#epub_cover = ()
314*0e552da7Schristos
315*0e552da7Schristos# A sequence of (type, uri, title) tuples for the guide element of content.opf.
316*0e552da7Schristos#epub_guide = ()
317*0e552da7Schristos
318*0e552da7Schristos# HTML files that should be inserted before the pages created by sphinx.
319*0e552da7Schristos# The format is a list of tuples containing the path and title.
320*0e552da7Schristos#epub_pre_files = []
321*0e552da7Schristos
322*0e552da7Schristos# HTML files shat should be inserted after the pages created by sphinx.
323*0e552da7Schristos# The format is a list of tuples containing the path and title.
324*0e552da7Schristos#epub_post_files = []
325*0e552da7Schristos
326*0e552da7Schristos# A list of files that should not be packed into the epub file.
327*0e552da7Schristosepub_exclude_files = ['search.html']
328*0e552da7Schristos
329*0e552da7Schristos# The depth of the table of contents in toc.ncx.
330*0e552da7Schristos#epub_tocdepth = 3
331*0e552da7Schristos
332*0e552da7Schristos# Allow duplicate toc entries.
333*0e552da7Schristos#epub_tocdup = True
334*0e552da7Schristos
335*0e552da7Schristos# Choose between 'default' and 'includehidden'.
336*0e552da7Schristos#epub_tocscope = 'default'
337*0e552da7Schristos
338*0e552da7Schristos# Fix unsupported image types using the PIL.
339*0e552da7Schristos#epub_fix_images = False
340*0e552da7Schristos
341*0e552da7Schristos# Scale large images.
342*0e552da7Schristos#epub_max_image_width = 0
343*0e552da7Schristos
344*0e552da7Schristos# How to display URL addresses: 'footnote', 'no', or 'inline'.
345*0e552da7Schristos#epub_show_urls = 'inline'
346*0e552da7Schristos
347*0e552da7Schristos# If false, no index is generated.
348*0e552da7Schristos#epub_use_index = True
349