Blame docs/src/conf.py

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