pip/docs/conf.py

259 lines
8.0 KiB
Python
Raw Normal View History

2008-10-16 00:02:57 +02:00
# -*- coding: utf-8 -*-
#
# pip documentation build configuration file, created by
# sphinx-quickstart on Tue Apr 22 22:08:49 2008
2008-10-16 00:02:57 +02:00
#
# This file is execfile()d with the current directory set to its containing dir
2008-10-16 00:02:57 +02:00
#
# Note that not all possible configuration values are present in this
# autogenerated file.
2008-10-16 00:02:57 +02:00
#
# All configuration values have a default; values that are commented out
# serve to show the default.
2008-10-16 00:02:57 +02:00
import os
import sys
import glob
2008-10-16 00:02:57 +02:00
2013-11-14 00:59:06 +01:00
on_rtd = os.environ.get('READTHEDOCS', None) == 'True'
# If extensions (or modules to document with autodoc) are in another directory,
# add these directories to sys.path here. If the directory is relative to the
# documentation root, use os.path.abspath to make it absolute, like shown here.
sys.path.insert(0, os.path.abspath(os.pardir))
2014-03-26 23:24:19 +01:00
# sys.path.append(os.path.join(os.path.dirname(__file__), '../'))
2008-10-16 00:02:57 +02:00
# -- General configuration ----------------------------------------------------
2008-10-16 00:02:57 +02:00
# Add any Sphinx extension module names here, as strings. They can be
# extensions coming with Sphinx (named 'sphinx.ext.*') or your custom ones.
2014-03-26 23:24:19 +01:00
# extensions = ['sphinx.ext.autodoc']
2015-05-31 01:43:45 +02:00
extensions = ['sphinx.ext.extlinks', 'docs.pipext', 'sphinx.ext.intersphinx']
# intersphinx
intersphinx_cache_limit = 0
intersphinx_mapping = {
2017-10-07 18:45:27 +02:00
'pypug': ('https://packaging.python.org/', None),
'pypa': ('https://www.pypa.io/en/latest/', None),
2015-05-31 01:43:45 +02:00
}
2008-10-16 00:02:57 +02:00
# Add any paths that contain templates here, relative to this directory.
templates_path = []
2008-10-16 00:02:57 +02:00
# The suffix of source filenames.
source_suffix = '.rst'
2008-10-16 00:02:57 +02:00
# The encoding of source files.
2014-03-26 23:24:19 +01:00
# source_encoding = 'utf-8'
2008-10-16 00:02:57 +02:00
# The master toctree document.
master_doc = 'index'
# General information about the project.
project = 'pip'
2017-10-07 18:45:27 +02:00
copyright = '2008-2017, PyPA'
2008-10-16 00:02:57 +02:00
# The version info for the project you're documenting, acts as replacement for
# |version| and |release|, also used in various other places throughout the
# built documents.
2008-10-16 00:02:57 +02:00
#
# The short X.Y version.
try:
from pip import __version__
# The short X.Y version.
version = '.'.join(__version__.split('.')[:2])
# The full version, including alpha/beta/rc tags.
release = __version__
except ImportError:
version = release = 'dev'
2017-10-20 17:47:32 +02:00
# We have this here because readthedocs plays tricks sometimes and there seems
# to be a hiesenbug, related to the version of pip discovered. This is here to
# help debug that if someone decides to do that in the future.
print(version)
# The language for content autogenerated by Sphinx. Refer to documentation
# for a list of supported languages.
2014-03-26 23:24:19 +01:00
# language = None
2008-10-16 00:02:57 +02:00
# There are two options for replacing |today|: either, you set today to some
# non-false value, then it is used:
2014-03-26 23:24:19 +01:00
# today = ''
2008-10-16 00:02:57 +02:00
# Else, today_fmt is used as the format for a strftime call.
today_fmt = '%B %d, %Y'
# List of documents that shouldn't be included in the build.
2014-03-26 23:24:19 +01:00
# unused_docs = []
# List of directories, relative to source directory, that shouldn't be searched
# for source files.
2017-10-07 18:45:27 +02:00
exclude_patterns = ['build/', 'man/']
# The reST default role (used for this markup: `text`) to use for all documents
2014-03-26 23:24:19 +01:00
# default_role = None
2008-10-16 00:02:57 +02:00
# If true, '()' will be appended to :func: etc. cross-reference text.
2014-03-26 23:24:19 +01:00
# add_function_parentheses = True
2008-10-16 00:02:57 +02:00
# If true, the current module name will be prepended to all description
# unit titles (such as .. function::).
2014-03-26 23:24:19 +01:00
# add_module_names = True
2008-10-16 00:02:57 +02:00
# If true, sectionauthor and moduleauthor directives will be shown in the
# output. They are ignored by default.
2014-03-26 23:24:19 +01:00
# show_authors = False
2008-10-16 00:02:57 +02:00
# The name of the Pygments (syntax highlighting) style to use.
pygments_style = 'sphinx'
# A list of ignored prefixes for module index sorting.
2014-03-26 23:24:19 +01:00
# modindex_common_prefix = []
extlinks = {
'issue': ('https://github.com/pypa/pip/issues/%s', '#'),
'pull': ('https://github.com/pypa/pip/pull/%s', 'PR #'),
}
# -- Options for HTML output --------------------------------------------------
# The theme to use for HTML and HTML Help pages. Major themes that come with
# Sphinx are currently 'default' and 'sphinxdoc'.
2017-10-07 18:45:27 +02:00
html_theme = "pypa_theme"
# Theme options are theme-specific and customize the look and feel of a theme
# further. For a list of options available for each theme, see the
# documentation.
2017-10-07 18:45:27 +02:00
html_theme_options = {
'collapsiblesidebar': True,
'externalrefs': True,
'navigation_depth': 2,
'issues_url': 'https://github.com/pypa/pip/issues'
}
2008-10-16 00:02:57 +02:00
# Add any paths that contain custom themes here, relative to this directory.
2008-10-16 00:02:57 +02:00
# The name for this set of Sphinx documents. If None, it defaults to
# "<project> v<release> documentation".
2014-03-26 23:24:19 +01:00
# html_title = None
# A shorter title for the navigation bar. Default is the same as html_title.
2014-03-26 23:24:19 +01:00
# html_short_title = None
# The name of an image file (relative to this directory) to place at the top
# of the sidebar.
2014-03-26 23:24:19 +01:00
# html_logo = '_static/piplogo.png'
# The name of an image file (within the static path) to use as favicon of the
# docs. This file should be a Windows icon file (.ico) being 16x16 or 32x32
# pixels large.
2014-03-26 23:24:19 +01:00
# html_favicon = 'favicon.png'
2008-10-16 00:02:57 +02:00
# Add any paths that contain custom static files (such as style sheets) here,
# relative to this directory. They are copied after the builtin static files,
# so a file named "default.css" will overwrite the builtin "default.css".
html_static_path = []
2008-10-16 00:02:57 +02:00
# If not '', a 'Last updated on:' timestamp is inserted at every page bottom,
# using the given strftime format.
html_last_updated_fmt = '%b %d, %Y'
# If true, SmartyPants will be used to convert quotes and dashes to
# typographically correct entities.
2017-10-07 18:45:27 +02:00
smart_quotes = False
2008-10-16 00:02:57 +02:00
# Custom sidebar templates, maps document names to template names.
2017-10-07 18:45:27 +02:00
html_sidebars = {
'**': ['localtoc.html', 'relations.html'],
'index': ['localtoc.html']
}
2008-10-16 00:02:57 +02:00
# Additional templates that should be rendered to pages, maps page names to
# template names.
2014-03-26 23:24:19 +01:00
# html_additional_pages = {}
2008-10-16 00:02:57 +02:00
# If false, no module index is generated.
html_use_modindex = False
# If false, no index is generated.
html_use_index = False
# If true, the index is split into individual pages for each letter.
2014-03-26 23:24:19 +01:00
# html_split_index = False
# If true, links to the reST sources are added to the pages.
html_show_sourcelink = False
# If true, an OpenSearch description file will be output, and all pages will
# contain a <link> tag referring to it. The value of this option must be the
# base URL from which the finished HTML is served.
2014-03-26 23:24:19 +01:00
# html_use_opensearch = ''
2008-10-16 00:02:57 +02:00
# If nonempty, this is the file name suffix for HTML files (e.g. ".xhtml").
2014-03-26 23:24:19 +01:00
# html_file_suffix = ''
2008-10-16 00:02:57 +02:00
# Output file base name for HTML help builder.
htmlhelp_basename = 'pipdocs'
2008-10-16 00:02:57 +02:00
# -- Options for LaTeX output -------------------------------------------------
2008-10-16 00:02:57 +02:00
# The paper size ('letter' or 'a4').
2014-03-26 23:24:19 +01:00
# latex_paper_size = 'letter'
2008-10-16 00:02:57 +02:00
# The font size ('10pt', '11pt' or '12pt').
2014-03-26 23:24:19 +01:00
# latex_font_size = '10pt'
2008-10-16 00:02:57 +02:00
# Grouping the document tree into LaTeX files. List of tuples
# (source start file, target name, title, author, documentclass [howto/manual])
latex_documents = [
(
'index',
'pip.tex',
u'pip Documentation',
u'pip developers',
'manual',
),
]
# The name of an image file (relative to this directory) to place at the top of
# the title page.
2014-03-26 23:24:19 +01:00
# latex_logo = None
# For "manual" documents, if this is true, then toplevel headings are parts,
# not chapters.
2014-03-26 23:24:19 +01:00
# latex_use_parts = False
2008-10-16 00:02:57 +02:00
# Additional stuff for the LaTeX preamble.
2014-03-26 23:24:19 +01:00
# latex_preamble = ''
2008-10-16 00:02:57 +02:00
# Documents to append as an appendix to all manuals.
2014-03-26 23:24:19 +01:00
# latex_appendices = []
2008-10-16 00:02:57 +02:00
# If false, no module index is generated.
2014-03-26 23:24:19 +01:00
# latex_use_modindex = True
# -- Options for Manual Pages -------------------------------------------------
# List of manual pages generated
man_pages = [
(
'man/pip',
'pip',
u'package manager for Python packages',
u'pip developers',
1
)
]
# Here, we crawl the entire man/commands/ directory and list every file with
# appropriate name and details
for fname in glob.glob('man/commands/*.rst'):
fname_base = fname[:-4]
outname = 'pip-' + fname_base[13:]
description = u'description of {} command'.format(
outname.replace('-', ' ')
)
man_pages.append((fname_base, outname, description, u'pip developers', 1))