conf.py
This file
Path
docs/conf.py
298 lines · 9.4 KiB · Python
Last changed by
fix linksDavid Lordbefore adoption97ad085
History of this fileTake it
The walk stopped after 200 commits: lines older than 773ad9b point at it.
Merge pull request #1172 from cgar/spellingMarkus Unterwaditzerbefore adoption773ad9b
lines 1–12why, one step back1# -*- 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 back13from __future__ import print_function14import os15import sys16import pkg_resources17import time18import datetimeMerge pull request #1172 from cgar/spellingMarkus Unterwaditzerbefore adoption773ad9b
line 19why, one step back19resolve merge conflictsKenneth Reitzbefore adoption31174fe
line 20why, one step back20BUILD_DATE = datetime.datetime.utcfromtimestamp(int(os.environ.get('SOURCE_DATE_EPOCH', time.time())))Merge pull request #1172 from cgar/spellingMarkus Unterwaditzerbefore adoption773ad9b
lines 21–24why, one step back2122# 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 back25sys.path.append(os.path.dirname(__file__))Merge pull request #1172 from cgar/spellingMarkus Unterwaditzerbefore adoption773ad9b
lines 26–33why, one step back2627# -- 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 back34extensions = [35 'sphinx.ext.autodoc',36 'sphinx.ext.intersphinx',37 'flaskdocext'38]Merge pull request #1172 from cgar/spellingMarkus Unterwaditzerbefore adoption773ad9b
line 39why, one step back39resolve merge conflictsKenneth Reitzbefore adoption31174fe
lines 40–47why, one step back40try: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')47Merge pull request #1172 from cgar/spellingMarkus Unterwaditzerbefore adoption773ad9b
lines 48–61why, one step back48# 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 back62copyright = u'2010 - {0}, Armin Ronacher'.format(BUILD_DATE.year)Merge pull request #1172 from cgar/spellingMarkus Unterwaditzerbefore adoption773ad9b
lines 63–69why, one step back6364# 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 back70 print('Flask must be installed to build the documentation.')71 print('Install from source using `pip install -e .` in a virtualenv.')Merge pull request #1172 from cgar/spellingMarkus Unterwaditzerbefore adoption773ad9b
lines 72–74why, one step back72 sys.exit(1)7374if 'dev' in release:resolve merge conflictsKenneth Reitzbefore adoption31174fe
lines 75–76why, one step back75 release = ''.join(release.partition('dev')[:2])76Merge pull request #1172 from cgar/spellingMarkus Unterwaditzerbefore adoption773ad9b
lines 77–114why, one step back77version = '.'.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 back115# html_theme = 'default'Merge pull request #1172 from cgar/spellingMarkus Unterwaditzerbefore adoption773ad9b
lines 116–119why, one step back116117# 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 back120# html_theme_options = {}Merge pull request #1172 from cgar/spellingMarkus Unterwaditzerbefore adoption773ad9b
lines 121–122why, one step back121122# 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 back123# html_theme_path = ['_themes']Merge pull request #1172 from cgar/spellingMarkus Unterwaditzerbefore adoption773ad9b
lines 124–138why, one step back124125# 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 back139html_favicon = '_static/flask-favicon.ico'Merge pull request #1172 from cgar/spellingMarkus Unterwaditzerbefore adoption773ad9b
lines 140–155why, one step back140141# 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 back156 '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 ]Merge pull request #1172 from cgar/spellingMarkus Unterwaditzerbefore adoption773ad9b
lines 168–208why, one step back168}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 back209 ('latexindex', 'Flask.tex', u'Flask Documentation', u'Armin Ronacher', 'manual'),Merge pull request #1172 from cgar/spellingMarkus Unterwaditzerbefore adoption773ad9b
lines 210–218why, one step back210]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 back219 'fontpkg': r'\usepackage{mathpazo}',220 'papersize': 'a4paper',221 'pointsize': '12pt',222 'preamble': r'\usepackage{flaskstyle}'Merge pull request #1172 from cgar/spellingMarkus Unterwaditzerbefore adoption773ad9b
lines 223–243why, one step back223}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 = ''243resolve merge conflictsKenneth Reitzbefore adoption31174fe
line 244why, one step back244# The unique identifier of the text. This can be an ISBN numberMerge pull request #1172 from cgar/spellingMarkus Unterwaditzerbefore adoption773ad9b
lines 245–265why, one step back245# 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–269why, one step back266 '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),fix linksDavid Lordbefore adoption97ad085
line 270why, one step back270 'itsdangerous': ('https://pythonhosted.org/itsdangerous', None),resolve merge conflictsKenneth Reitzbefore adoption31174fe
lines 271–272why, one step back271 'sqlalchemy': ('https://docs.sqlalchemy.org/en/latest/', None),272 'wtforms': ('https://wtforms.readthedocs.io/en/latest/', None),fix linksDavid Lordbefore adoption97ad085
line 273why, one step back273 'blinker': ('https://pythonhosted.org/blinker/', None),Merge pull request #1172 from cgar/spellingMarkus Unterwaditzerbefore adoption773ad9b
lines 274–275why, one step back274}275use alabasterKenneth Reitzbefore adoption386ac92
lines 276–278why, one step back276html_theme_options = {277 'touch_icon': 'touch-icon.png'278}Merge pull request #1483 from untitaker/improve-autodocMarkus Unterwaditzerbefore adoption5c68b24
lines 279–298why, one step back279280# unwrap decorators281def unwrap_decorators():282 import sphinx.util.inspect as inspect283 import functools284285 old_getargspec = inspect.getargspec286 def getargspec(x):287 return old_getargspec(getattr(x, '_original_function', x))288 inspect.getargspec = getargspec289290 old_update_wrapper = functools.update_wrapper291 def update_wrapper(wrapper, wrapped, *a, **kw):292 rv = old_update_wrapper(wrapper, wrapped, *a, **kw)293 rv._original_function = wrapped294 return rv295 functools.update_wrapper = update_wrapper296297unwrap_decorators()298del unwrap_decorators