Blame docs/src/conf.py

Packit Service 7c31a4
# -*- coding: utf-8 -*-
Packit Service 7c31a4
#
Packit Service 7c31a4
# libuv documentation documentation build configuration file, created by
Packit Service 7c31a4
# sphinx-quickstart on Sun Jul 27 11:47:51 2014.
Packit Service 7c31a4
#
Packit Service 7c31a4
# This file is execfile()d with the current directory set to its
Packit Service 7c31a4
# containing dir.
Packit Service 7c31a4
#
Packit Service 7c31a4
# Note that not all possible configuration values are present in this
Packit Service 7c31a4
# autogenerated file.
Packit Service 7c31a4
#
Packit Service 7c31a4
# All configuration values have a default; values that are commented out
Packit Service 7c31a4
# serve to show the default.
Packit Service 7c31a4
Packit Service 7c31a4
import os
Packit Service 7c31a4
import re
Packit Service 7c31a4
import sys
Packit Service 7c31a4
Packit Service 7c31a4
Packit Service 7c31a4
def get_libuv_version():
Packit Service 7c31a4
    with open('../../include/uv/version.h') as f:
Packit Service 7c31a4
        data = f.read()
Packit Service 7c31a4
    try:
Packit Service 7c31a4
        m = re.search(r"""^#define UV_VERSION_MAJOR (\d+)$""", data, re.MULTILINE)
Packit Service 7c31a4
        major = int(m.group(1))
Packit Service 7c31a4
        m = re.search(r"""^#define UV_VERSION_MINOR (\d+)$""", data, re.MULTILINE)
Packit Service 7c31a4
        minor = int(m.group(1))
Packit Service 7c31a4
        m = re.search(r"""^#define UV_VERSION_PATCH (\d+)$""", data, re.MULTILINE)
Packit Service 7c31a4
        patch = int(m.group(1))
Packit Service 7c31a4
        m = re.search(r"""^#define UV_VERSION_IS_RELEASE (\d)$""", data, re.MULTILINE)
Packit Service 7c31a4
        is_release = int(m.group(1))
Packit Service 7c31a4
        m = re.search(r"""^#define UV_VERSION_SUFFIX \"(\w*)\"$""", data, re.MULTILINE)
Packit Service 7c31a4
        suffix = m.group(1)
Packit Service 7c31a4
        return '%d.%d.%d%s' % (major, minor, patch, '-%s' % suffix if not is_release else '')
Packit Service 7c31a4
    except Exception:
Packit Service 7c31a4
        return 'unknown'
Packit Service 7c31a4
Packit Service 7c31a4
# If extensions (or modules to document with autodoc) are in another directory,
Packit Service 7c31a4
# add these directories to sys.path here. If the directory is relative to the
Packit Service 7c31a4
# documentation root, use os.path.abspath to make it absolute, like shown here.
Packit Service 7c31a4
sys.path.insert(0, os.path.abspath('sphinx-plugins'))
Packit Service 7c31a4
Packit Service 7c31a4
# -- General configuration ------------------------------------------------
Packit Service 7c31a4
Packit Service 7c31a4
# If your documentation needs a minimal Sphinx version, state it here.
Packit Service 7c31a4
#needs_sphinx = '1.0'
Packit Service 7c31a4
Packit Service 7c31a4
# Add any Sphinx extension module names here, as strings. They can be
Packit Service 7c31a4
# extensions coming with Sphinx (named 'sphinx.ext.*') or your custom
Packit Service 7c31a4
# ones.
Packit Service 7c31a4
extensions = ['manpage']
Packit Service 7c31a4
Packit Service 7c31a4
# Add any paths that contain templates here, relative to this directory.
Packit Service 7c31a4
templates_path = ['templates']
Packit Service 7c31a4
Packit Service 7c31a4
# The suffix of source filenames.
Packit Service 7c31a4
source_suffix = '.rst'
Packit Service 7c31a4
Packit Service 7c31a4
# The encoding of source files.
Packit Service 7c31a4
#source_encoding = 'utf-8-sig'
Packit Service 7c31a4
Packit Service 7c31a4
# The master toctree document.
Packit Service 7c31a4
master_doc = 'index'
Packit Service 7c31a4
Packit Service 7c31a4
# General information about the project.
Packit Service 7c31a4
project = u'libuv API documentation'
Packit Service 7c31a4
copyright = u'2014-present, libuv contributors'
Packit Service 7c31a4
Packit Service 7c31a4
# The version info for the project you're documenting, acts as replacement for
Packit Service 7c31a4
# |version| and |release|, also used in various other places throughout the
Packit Service 7c31a4
# built documents.
Packit Service 7c31a4
#
Packit Service 7c31a4
# The short X.Y version.
Packit Service 7c31a4
version = get_libuv_version()
Packit Service 7c31a4
# The full version, including alpha/beta/rc tags.
Packit Service 7c31a4
release = version
Packit Service 7c31a4
Packit Service 7c31a4
# The language for content autogenerated by Sphinx. Refer to documentation
Packit Service 7c31a4
# for a list of supported languages.
Packit Service 7c31a4
#language = None
Packit Service 7c31a4
Packit Service 7c31a4
# There are two options for replacing |today|: either, you set today to some
Packit Service 7c31a4
# non-false value, then it is used:
Packit Service 7c31a4
#today = ''
Packit Service 7c31a4
# Else, today_fmt is used as the format for a strftime call.
Packit Service 7c31a4
#today_fmt = '%B %d, %Y'
Packit Service 7c31a4
Packit Service 7c31a4
# List of patterns, relative to source directory, that match files and
Packit Service 7c31a4
# directories to ignore when looking for source files.
Packit Service 7c31a4
exclude_patterns = []
Packit Service 7c31a4
Packit Service 7c31a4
# The reST default role (used for this markup: `text`) to use for all
Packit Service 7c31a4
# documents.
Packit Service 7c31a4
#default_role = None
Packit Service 7c31a4
Packit Service 7c31a4
# If true, '()' will be appended to :func: etc. cross-reference text.
Packit Service 7c31a4
#add_function_parentheses = True
Packit Service 7c31a4
Packit Service 7c31a4
# If true, the current module name will be prepended to all description
Packit Service 7c31a4
# unit titles (such as .. function::).
Packit Service 7c31a4
#add_module_names = True
Packit Service 7c31a4
Packit Service 7c31a4
# If true, sectionauthor and moduleauthor directives will be shown in the
Packit Service 7c31a4
# output. They are ignored by default.
Packit Service 7c31a4
#show_authors = False
Packit Service 7c31a4
Packit Service 7c31a4
# The name of the Pygments (syntax highlighting) style to use.
Packit Service 7c31a4
pygments_style = 'sphinx'
Packit Service 7c31a4
Packit Service 7c31a4
# A list of ignored prefixes for module index sorting.
Packit Service 7c31a4
#modindex_common_prefix = []
Packit Service 7c31a4
Packit Service 7c31a4
# If true, keep warnings as "system message" paragraphs in the built documents.
Packit Service 7c31a4
#keep_warnings = False
Packit Service 7c31a4
Packit Service 7c31a4
Packit Service 7c31a4
# -- Options for HTML output ----------------------------------------------
Packit Service 7c31a4
Packit Service 7c31a4
# The theme to use for HTML and HTML Help pages.  See the documentation for
Packit Service 7c31a4
# a list of builtin themes.
Packit Service 7c31a4
html_theme = 'nature'
Packit Service 7c31a4
Packit Service 7c31a4
# Theme options are theme-specific and customize the look and feel of a theme
Packit Service 7c31a4
# further.  For a list of options available for each theme, see the
Packit Service 7c31a4
# documentation.
Packit Service 7c31a4
#html_theme_options = {}
Packit Service 7c31a4
Packit Service 7c31a4
# Add any paths that contain custom themes here, relative to this directory.
Packit Service 7c31a4
#html_theme_path = []
Packit Service 7c31a4
Packit Service 7c31a4
# The name for this set of Sphinx documents.  If None, it defaults to
Packit Service 7c31a4
# "<project> v<release> documentation".
Packit Service 7c31a4
html_title = 'libuv documentation'
Packit Service 7c31a4
Packit Service 7c31a4
# A shorter title for the navigation bar.  Default is the same as html_title.
Packit Service 7c31a4
html_short_title = 'libuv %s documentation' % version
Packit Service 7c31a4
Packit Service 7c31a4
# The name of an image file (relative to this directory) to place at the top
Packit Service 7c31a4
# of the sidebar.
Packit Service 7c31a4
html_logo = 'static/logo.png'
Packit Service 7c31a4
Packit Service 7c31a4
# The name of an image file (within the static path) to use as favicon of the
Packit Service 7c31a4
# docs.  This file should be a Windows icon file (.ico) being 16x16 or 32x32
Packit Service 7c31a4
# pixels large.
Packit Service 7c31a4
html_favicon = 'static/favicon.ico'
Packit Service 7c31a4
Packit Service 7c31a4
# Add any paths that contain custom static files (such as style sheets) here,
Packit Service 7c31a4
# relative to this directory. They are copied after the builtin static files,
Packit Service 7c31a4
# so a file named "default.css" will overwrite the builtin "default.css".
Packit Service 7c31a4
html_static_path = ['static']
Packit Service 7c31a4
Packit Service 7c31a4
# Add any extra paths that contain custom files (such as robots.txt or
Packit Service 7c31a4
# .htaccess) here, relative to this directory. These files are copied
Packit Service 7c31a4
# directly to the root of the documentation.
Packit Service 7c31a4
#html_extra_path = []
Packit Service 7c31a4
Packit Service 7c31a4
# If not '', a 'Last updated on:' timestamp is inserted at every page bottom,
Packit Service 7c31a4
# using the given strftime format.
Packit Service 7c31a4
#html_last_updated_fmt = '%b %d, %Y'
Packit Service 7c31a4
Packit Service 7c31a4
# If true, SmartyPants will be used to convert quotes and dashes to
Packit Service 7c31a4
# typographically correct entities.
Packit Service 7c31a4
#html_use_smartypants = True
Packit Service 7c31a4
Packit Service 7c31a4
# Custom sidebar templates, maps document names to template names.
Packit Service 7c31a4
#html_sidebars = {}
Packit Service 7c31a4
Packit Service 7c31a4
# Additional templates that should be rendered to pages, maps page names to
Packit Service 7c31a4
# template names.
Packit Service 7c31a4
#html_additional_pages = {}
Packit Service 7c31a4
Packit Service 7c31a4
# If false, no module index is generated.
Packit Service 7c31a4
#html_domain_indices = True
Packit Service 7c31a4
Packit Service 7c31a4
# If false, no index is generated.
Packit Service 7c31a4
#html_use_index = True
Packit Service 7c31a4
Packit Service 7c31a4
# If true, the index is split into individual pages for each letter.
Packit Service 7c31a4
#html_split_index = False
Packit Service 7c31a4
Packit Service 7c31a4
# If true, links to the reST sources are added to the pages.
Packit Service 7c31a4
#html_show_sourcelink = True
Packit Service 7c31a4
Packit Service 7c31a4
# If true, "Created using Sphinx" is shown in the HTML footer. Default is True.
Packit Service 7c31a4
#html_show_sphinx = True
Packit Service 7c31a4
Packit Service 7c31a4
# If true, "(C) Copyright ..." is shown in the HTML footer. Default is True.
Packit Service 7c31a4
#html_show_copyright = True
Packit Service 7c31a4
Packit Service 7c31a4
# If true, an OpenSearch description file will be output, and all pages will
Packit Service 7c31a4
# contain a <link> tag referring to it.  The value of this option must be the
Packit Service 7c31a4
# base URL from which the finished HTML is served.
Packit Service 7c31a4
#html_use_opensearch = ''
Packit Service 7c31a4
Packit Service 7c31a4
# This is the file name suffix for HTML files (e.g. ".xhtml").
Packit Service 7c31a4
#html_file_suffix = None
Packit Service 7c31a4
Packit Service 7c31a4
# Output file base name for HTML help builder.
Packit Service 7c31a4
htmlhelp_basename = 'libuv'
Packit Service 7c31a4
Packit Service 7c31a4
Packit Service 7c31a4
# -- Options for LaTeX output ---------------------------------------------
Packit Service 7c31a4
Packit Service 7c31a4
latex_elements = {
Packit Service 7c31a4
# The paper size ('letterpaper' or 'a4paper').
Packit Service 7c31a4
#'papersize': 'letterpaper',
Packit Service 7c31a4
Packit Service 7c31a4
# The font size ('10pt', '11pt' or '12pt').
Packit Service 7c31a4
#'pointsize': '10pt',
Packit Service 7c31a4
Packit Service 7c31a4
# Additional stuff for the LaTeX preamble.
Packit Service 7c31a4
#'preamble': '',
Packit Service 7c31a4
}
Packit Service 7c31a4
Packit Service 7c31a4
# Grouping the document tree into LaTeX files. List of tuples
Packit Service 7c31a4
# (source start file, target name, title,
Packit Service 7c31a4
#  author, documentclass [howto, manual, or own class]).
Packit Service 7c31a4
latex_documents = [
Packit Service 7c31a4
  ('index', 'libuv.tex', u'libuv documentation',
Packit Service 7c31a4
   u'libuv contributors', 'manual'),
Packit Service 7c31a4
]
Packit Service 7c31a4
Packit Service 7c31a4
# The name of an image file (relative to this directory) to place at the top of
Packit Service 7c31a4
# the title page.
Packit Service 7c31a4
#latex_logo = None
Packit Service 7c31a4
Packit Service 7c31a4
# For "manual" documents, if this is true, then toplevel headings are parts,
Packit Service 7c31a4
# not chapters.
Packit Service 7c31a4
#latex_use_parts = False
Packit Service 7c31a4
Packit Service 7c31a4
# If true, show page references after internal links.
Packit Service 7c31a4
#latex_show_pagerefs = False
Packit Service 7c31a4
Packit Service 7c31a4
# If true, show URL addresses after external links.
Packit Service 7c31a4
#latex_show_urls = False
Packit Service 7c31a4
Packit Service 7c31a4
# Documents to append as an appendix to all manuals.
Packit Service 7c31a4
#latex_appendices = []
Packit Service 7c31a4
Packit Service 7c31a4
# If false, no module index is generated.
Packit Service 7c31a4
#latex_domain_indices = True
Packit Service 7c31a4
Packit Service 7c31a4
Packit Service 7c31a4
# -- Options for manual page output ---------------------------------------
Packit Service 7c31a4
Packit Service 7c31a4
# One entry per manual page. List of tuples
Packit Service 7c31a4
# (source start file, name, description, authors, manual section).
Packit Service 7c31a4
man_pages = [
Packit Service 7c31a4
    ('index', 'libuv', u'libuv documentation',
Packit Service 7c31a4
     [u'libuv contributors'], 1)
Packit Service 7c31a4
]
Packit Service 7c31a4
Packit Service 7c31a4
# If true, show URL addresses after external links.
Packit Service 7c31a4
#man_show_urls = False
Packit Service 7c31a4
Packit Service 7c31a4
Packit Service 7c31a4
# -- Options for Texinfo output -------------------------------------------
Packit Service 7c31a4
Packit Service 7c31a4
# Grouping the document tree into Texinfo files. List of tuples
Packit Service 7c31a4
# (source start file, target name, title, author,
Packit Service 7c31a4
#  dir menu entry, description, category)
Packit Service 7c31a4
texinfo_documents = [
Packit Service 7c31a4
  ('index', 'libuv', u'libuv documentation',
Packit Service 7c31a4
   u'libuv contributors', 'libuv', 'Cross-platform asynchronous I/O',
Packit Service 7c31a4
   'Miscellaneous'),
Packit Service 7c31a4
]
Packit Service 7c31a4
Packit Service 7c31a4
# Documents to append as an appendix to all manuals.
Packit Service 7c31a4
#texinfo_appendices = []
Packit Service 7c31a4
Packit Service 7c31a4
# If false, no module index is generated.
Packit Service 7c31a4
#texinfo_domain_indices = True
Packit Service 7c31a4
Packit Service 7c31a4
# How to display URL addresses: 'footnote', 'no', or 'inline'.
Packit Service 7c31a4
#texinfo_show_urls = 'footnote'
Packit Service 7c31a4
Packit Service 7c31a4
# If true, do not generate a @detailmenu in the "Top" node's menu.
Packit Service 7c31a4
#texinfo_no_detailmenu = False
Packit Service 7c31a4
Packit Service 7c31a4
Packit Service 7c31a4
# -- Options for Epub output ----------------------------------------------
Packit Service 7c31a4
Packit Service 7c31a4
# Bibliographic Dublin Core info.
Packit Service 7c31a4
epub_title = u'libuv documentation'
Packit Service 7c31a4
epub_author = u'libuv contributors'
Packit Service 7c31a4
epub_publisher = u'libuv contributors'
Packit Service 7c31a4
epub_copyright = u'2014-present, libuv contributors'
Packit Service 7c31a4
Packit Service 7c31a4
# The basename for the epub file. It defaults to the project name.
Packit Service 7c31a4
epub_basename = u'libuv'
Packit Service 7c31a4
Packit Service 7c31a4
# The HTML theme for the epub output. Since the default themes are not optimized
Packit Service 7c31a4
# for small screen space, using the same theme for HTML and epub output is
Packit Service 7c31a4
# usually not wise. This defaults to 'epub', a theme designed to save visual
Packit Service 7c31a4
# space.
Packit Service 7c31a4
#epub_theme = 'epub'
Packit Service 7c31a4
Packit Service 7c31a4
# The language of the text. It defaults to the language option
Packit Service 7c31a4
# or en if the language is not set.
Packit Service 7c31a4
#epub_language = ''
Packit Service 7c31a4
Packit Service 7c31a4
# The scheme of the identifier. Typical schemes are ISBN or URL.
Packit Service 7c31a4
#epub_scheme = ''
Packit Service 7c31a4
Packit Service 7c31a4
# The unique identifier of the text. This can be a ISBN number
Packit Service 7c31a4
# or the project homepage.
Packit Service 7c31a4
#epub_identifier = ''
Packit Service 7c31a4
Packit Service 7c31a4
# A unique identification for the text.
Packit Service 7c31a4
#epub_uid = ''
Packit Service 7c31a4
Packit Service 7c31a4
# A tuple containing the cover image and cover page html template filenames.
Packit Service 7c31a4
#epub_cover = ()
Packit Service 7c31a4
Packit Service 7c31a4
# A sequence of (type, uri, title) tuples for the guide element of content.opf.
Packit Service 7c31a4
#epub_guide = ()
Packit Service 7c31a4
Packit Service 7c31a4
# HTML files that should be inserted before the pages created by sphinx.
Packit Service 7c31a4
# The format is a list of tuples containing the path and title.
Packit Service 7c31a4
#epub_pre_files = []
Packit Service 7c31a4
Packit Service 7c31a4
# HTML files shat should be inserted after the pages created by sphinx.
Packit Service 7c31a4
# The format is a list of tuples containing the path and title.
Packit Service 7c31a4
#epub_post_files = []
Packit Service 7c31a4
Packit Service 7c31a4
# A list of files that should not be packed into the epub file.
Packit Service 7c31a4
epub_exclude_files = ['search.html']
Packit Service 7c31a4
Packit Service 7c31a4
# The depth of the table of contents in toc.ncx.
Packit Service 7c31a4
#epub_tocdepth = 3
Packit Service 7c31a4
Packit Service 7c31a4
# Allow duplicate toc entries.
Packit Service 7c31a4
#epub_tocdup = True
Packit Service 7c31a4
Packit Service 7c31a4
# Choose between 'default' and 'includehidden'.
Packit Service 7c31a4
#epub_tocscope = 'default'
Packit Service 7c31a4
Packit Service 7c31a4
# Fix unsupported image types using the PIL.
Packit Service 7c31a4
#epub_fix_images = False
Packit Service 7c31a4
Packit Service 7c31a4
# Scale large images.
Packit Service 7c31a4
#epub_max_image_width = 0
Packit Service 7c31a4
Packit Service 7c31a4
# How to display URL addresses: 'footnote', 'no', or 'inline'.
Packit Service 7c31a4
#epub_show_urls = 'inline'
Packit Service 7c31a4
Packit Service 7c31a4
# If false, no index is generated.
Packit Service 7c31a4
#epub_use_index = True