Skip to content
Myr

conf.py

This file

Path

docs/conf.py

297 lines · 9.3 KiB · Python

Last changed by

use alabasterKenneth Reitzbefore adoption386ac92

History of this file

Take it

The walk stopped after 200 commits: lines older than 2f60124 point at it.

Removed ridiculous constructor from AppGroupArmin Ronacherbefore adoption2f60124

lines 1–12why, one step back
1# -*- coding: utf-8 -*-
2#3# Flask documentation build configuration file, created by4# sphinx-quickstart on Tue Apr 6 15:24:58 2010.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 this9# autogenerated file.10#11# All configuration values have a default; values that are commented out12# serve to show the default.

resolve merge conflictsKenneth Reitzbefore adoption31174fe

lines 13–18why, one step back
13from __future__ import print_function
14import os15import sys16import pkg_resources17import time18import datetime

Removed ridiculous constructor from AppGroupArmin Ronacherbefore adoption2f60124

line 19why, one step back
19

resolve merge conflictsKenneth Reitzbefore adoption31174fe

line 20why, one step back
20BUILD_DATE = datetime.datetime.utcfromtimestamp(int(os.environ.get('SOURCE_DATE_EPOCH', time.time())))

Removed ridiculous constructor from AppGroupArmin Ronacherbefore adoption2f60124

lines 21–24why, one step back
21
22# If extensions (or modules to document with autodoc) are in another directory,23# add these directories to sys.path here. If the directory is relative to the24# documentation root, use os.path.abspath to make it absolute, like shown here.

resolve merge conflictsKenneth Reitzbefore adoption31174fe

line 25why, one step back
25sys.path.append(os.path.dirname(__file__))

Removed ridiculous constructor from AppGroupArmin Ronacherbefore adoption2f60124

lines 26–33why, one step back
26
27# -- General configuration -----------------------------------------------------2829# If your documentation needs a minimal Sphinx version, state it here.30#needs_sphinx = '1.0'3132# Add any Sphinx extension module names here, as strings. They can be extensions33# coming with Sphinx (named 'sphinx.ext.*') or your custom ones.

resolve merge conflictsKenneth Reitzbefore adoption31174fe

lines 34–38why, one step back
34extensions = [
35 'sphinx.ext.autodoc',36 'sphinx.ext.intersphinx',37 'flaskdocext'38]

Removed ridiculous constructor from AppGroupArmin Ronacherbefore adoption2f60124

line 39why, one step back
39

resolve merge conflictsKenneth Reitzbefore adoption31174fe

lines 40–47why, one step back
40try:
41 __import__('sphinxcontrib.log_cabinet')42except ImportError:43 print('sphinxcontrib-log-cabinet is not installed.')44 print('Changelog directives will not be re-organized.')45else:46 extensions.append('sphinxcontrib.log_cabinet')47

Removed ridiculous constructor from AppGroupArmin Ronacherbefore adoption2f60124

lines 48–61why, one step back
48# Add any paths that contain templates here, relative to this directory.
49templates_path = ['_templates']5051# The suffix of source filenames.52source_suffix = '.rst'5354# The encoding of source files.55#source_encoding = 'utf-8-sig'5657# The master toctree document.58master_doc = 'index'5960# General information about the project.61project = u'Flask'

resolve merge conflictsKenneth Reitzbefore adoption31174fe

line 62why, one step back
62copyright = u'2010 - {0}, Armin Ronacher'.format(BUILD_DATE.year)

Removed ridiculous constructor from AppGroupArmin Ronacherbefore adoption2f60124

lines 63–69why, one step back
63
64# The version info for the project you're documenting, acts as replacement for65# |version| and |release|, also used in various other places throughout the66# built documents.67try:68 release = pkg_resources.get_distribution('Flask').version69except pkg_resources.DistributionNotFound:

resolve merge conflictsKenneth Reitzbefore adoption31174fe

lines 70–71why, one step back
70 print('Flask must be installed to build the documentation.')
71 print('Install from source using `pip install -e .` in a virtualenv.')

Removed ridiculous constructor from AppGroupArmin Ronacherbefore adoption2f60124

lines 72–74why, one step back
72 sys.exit(1)
7374if 'dev' in release:

resolve merge conflictsKenneth Reitzbefore adoption31174fe

lines 75–76why, one step back
75 release = ''.join(release.partition('dev')[:2])
76

Removed ridiculous constructor from AppGroupArmin Ronacherbefore adoption2f60124

lines 77–114why, one step back
77version = '.'.join(release.split('.')[:2])
7879# The language for content autogenerated by Sphinx. Refer to documentation80# for a list of supported languages.81#language = None8283# There are two options for replacing |today|: either, you set today to some84# non-false value, then it is used:85#today = ''86# Else, today_fmt is used as the format for a strftime call.87#today_fmt = '%B %d, %Y'8889# List of patterns, relative to source directory, that match files and90# directories to ignore when looking for source files.91exclude_patterns = ['_build']9293# The reST default role (used for this markup: `text`) to use for all documents.94#default_role = None9596# If true, '()' will be appended to :func: etc. cross-reference text.97#add_function_parentheses = True9899# If true, the current module name will be prepended to all description100# unit titles (such as .. function::).101#add_module_names = True102103# If true, sectionauthor and moduleauthor directives will be shown in the104# output. They are ignored by default.105#show_authors = False106107# A list of ignored prefixes for module index sorting.108#modindex_common_prefix = []109110111# -- Options for HTML output ---------------------------------------------------112113# The theme to use for HTML and HTML Help pages. Major themes that come with114# Sphinx are currently 'default' and 'sphinxdoc'.

resolve merge conflictsKenneth Reitzbefore adoption31174fe

line 115why, one step back
115# html_theme = 'default'

Removed ridiculous constructor from AppGroupArmin Ronacherbefore adoption2f60124

lines 116–119why, one step back
116
117# Theme options are theme-specific and customize the look and feel of a theme118# further. For a list of options available for each theme, see the119# documentation.

resolve merge conflictsKenneth Reitzbefore adoption31174fe

line 120why, one step back
120# html_theme_options = {}

Removed ridiculous constructor from AppGroupArmin Ronacherbefore adoption2f60124

lines 121–122why, one step back
121
122# Add any paths that contain custom themes here, relative to this directory.

Merge pull request #2080 from pallets/sphinx_themeKenneth Reitzbefore adoption4eca29f

line 123why, one step back
123# html_theme_path = ['_themes']

Removed ridiculous constructor from AppGroupArmin Ronacherbefore adoption2f60124

lines 124–138why, one step back
124
125# The name for this set of Sphinx documents. If None, it defaults to126# "<project> v<release> documentation".127#html_title = None128129# A shorter title for the navigation bar. Default is the same as html_title.130#html_short_title = None131132# The name of an image file (relative to this directory) to place at the top133# of the sidebar. Do not set, template magic!134#html_logo = None135136# The name of an image file (within the static path) to use as favicon of the137# docs. This file should be a Windows icon file (.ico) being 16x16 or 32x32138# pixels large.

resolve merge conflictsKenneth Reitzbefore adoption31174fe

line 139why, one step back
139html_favicon = '_static/flask-favicon.ico'

Removed ridiculous constructor from AppGroupArmin Ronacherbefore adoption2f60124

lines 140–155why, one step back
140
141# Add any paths that contain custom static files (such as style sheets) here,142# relative to this directory. They are copied after the builtin static files,143# so a file named "default.css" will overwrite the builtin "default.css".144html_static_path = ['_static']145146# If not '', a 'Last updated on:' timestamp is inserted at every page bottom,147# using the given strftime format.148#html_last_updated_fmt = '%b %d, %Y'149150# If true, SmartyPants will be used to convert quotes and dashes to151# typographically correct entities.152#html_use_smartypants = True153154# Custom sidebar templates, maps document names to template names.155html_sidebars = {

resolve merge conflictsKenneth Reitzbefore adoption31174fe

lines 156–167why, one step back
156 'index': [
157 'sidebarintro.html',158 'sourcelink.html',159 'searchbox.html'160 ],161 '**': [162 'sidebarlogo.html',163 'localtoc.html',164 'relations.html',165 'sourcelink.html',166 'searchbox.html'167 ]

Removed ridiculous constructor from AppGroupArmin Ronacherbefore adoption2f60124

lines 168–208why, one step back
168}
169170# Additional templates that should be rendered to pages, maps page names to171# template names.172#html_additional_pages = {}173174# If false, no module index is generated.175html_use_modindex = False176177# If false, no index is generated.178#html_use_index = True179180# If true, the index is split into individual pages for each letter.181#html_split_index = False182183# If true, links to the reST sources are added to the pages.184#html_show_sourcelink = True185186# If true, "Created using Sphinx" is shown in the HTML footer. Default is True.187html_show_sphinx = False188189# If true, "(C) Copyright ..." is shown in the HTML footer. Default is True.190#html_show_copyright = True191192# If true, an OpenSearch description file will be output, and all pages will193# contain a <link> tag referring to it. The value of this option must be the194# base URL from which the finished HTML is served.195#html_use_opensearch = ''196197# If nonempty, this is the file name suffix for HTML files (e.g. ".xhtml").198#html_file_suffix = ''199200# Output file base name for HTML help builder.201htmlhelp_basename = 'Flaskdoc'202203204# -- Options for LaTeX output --------------------------------------------------205206# Grouping the document tree into LaTeX files. List of tuples207# (source start file, target name, title, author, documentclass [howto/manual]).208latex_documents = [

resolve merge conflictsKenneth Reitzbefore adoption31174fe

line 209why, one step back
209 ('latexindex', 'Flask.tex', u'Flask Documentation', u'Armin Ronacher', 'manual'),

Removed ridiculous constructor from AppGroupArmin Ronacherbefore adoption2f60124

lines 210–218why, one step back
210]
211212# Documents to append as an appendix to all manuals.213#latex_appendices = []214215# If false, no module index is generated.216latex_use_modindex = False217218latex_elements = {

resolve merge conflictsKenneth Reitzbefore adoption31174fe

lines 219–222why, one step back
219 'fontpkg': r'\usepackage{mathpazo}',
220 'papersize': 'a4paper',221 'pointsize': '12pt',222 'preamble': r'\usepackage{flaskstyle}'

Removed ridiculous constructor from AppGroupArmin Ronacherbefore adoption2f60124

lines 223–243why, one step back
223}
224latex_use_parts = True225226latex_additional_files = ['flaskstyle.sty', 'logo.pdf']227228229# -- Options for Epub output ---------------------------------------------------230231# Bibliographic Dublin Core info.232#epub_title = ''233#epub_author = ''234#epub_publisher = ''235#epub_copyright = ''236237# The language of the text. It defaults to the language option238# or en if the language is not set.239#epub_language = ''240241# The scheme of the identifier. Typical schemes are ISBN or URL.242#epub_scheme = ''243

resolve merge conflictsKenneth Reitzbefore adoption31174fe

line 244why, one step back
244# The unique identifier of the text. This can be an ISBN number

Removed ridiculous constructor from AppGroupArmin Ronacherbefore adoption2f60124

lines 245–265why, one step back
245# or the project homepage.
246#epub_identifier = ''247248# A unique identification for the text.249#epub_uid = ''250251# HTML files that should be inserted before the pages created by sphinx.252# The format is a list of tuples containing the path and title.253#epub_pre_files = []254255# HTML files shat should be inserted after the pages created by sphinx.256# The format is a list of tuples containing the path and title.257#epub_post_files = []258259# A list of files that should not be packed into the epub file.260#epub_exclude_files = []261262# The depth of the table of contents in toc.ncx.263#epub_tocdepth = 3264265intersphinx_mapping = {

resolve merge conflictsKenneth Reitzbefore adoption31174fe

lines 266–272why, one step back
266 'python': ('https://docs.python.org/3/', None),
267 'werkzeug': ('http://werkzeug.pocoo.org/docs/', None),268 'click': ('http://click.pocoo.org/', None),269 'jinja': ('http://jinja.pocoo.org/docs/', None),270 'sqlalchemy': ('https://docs.sqlalchemy.org/en/latest/', None),271 'wtforms': ('https://wtforms.readthedocs.io/en/latest/', None),272 'blinker': ('https://pythonhosted.org/blinker/', None)

Removed ridiculous constructor from AppGroupArmin Ronacherbefore adoption2f60124

lines 273–274why, one step back
273}
274

use alabasterKenneth Reitzbefore adoption386ac92

lines 275–277why, one step back
275html_theme_options = {
276 'touch_icon': 'touch-icon.png'277}

Merge pull request #1483 from untitaker/improve-autodocMarkus Unterwaditzerbefore adoption5c68b24

lines 278–297why, one step back
278
279# unwrap decorators280def unwrap_decorators():281 import sphinx.util.inspect as inspect282 import functools283284 old_getargspec = inspect.getargspec285 def getargspec(x):286 return old_getargspec(getattr(x, '_original_function', x))287 inspect.getargspec = getargspec288289 old_update_wrapper = functools.update_wrapper290 def update_wrapper(wrapper, wrapped, *a, **kw):291 rv = old_update_wrapper(wrapper, wrapped, *a, **kw)292 rv._original_function = wrapped293 return rv294 functools.update_wrapper = update_wrapper295296unwrap_decorators()297del unwrap_decorators