Pillow/docs/conf.py

77 lines
1.8 KiB
Python
Raw Normal View History

# -*- coding: utf-8 -*-
2013-10-09 03:19:35 +04:00
import os
import sys
2013-04-12 22:05:45 +04:00
sys.path.insert(0, os.path.abspath('../'))
2013-10-07 07:48:18 +04:00
import PIL
2013-10-09 03:19:35 +04:00
### general configuration ###
2013-10-09 03:19:35 +04:00
needs_sphinx = '1.0'
extensions = ['sphinx.ext.autodoc', 'sphinx.ext.viewcode',
'sphinx.ext.intersphinx']
intersphinx_mapping = {'http://docs.python.org/2/': None}
source_suffix = '.rst'
2013-10-09 03:19:35 +04:00
templates_path = ['_templates']
#source_encoding = 'utf-8-sig'
master_doc = 'index'
project = u'Pillow (PIL fork)'
2013-10-09 03:19:35 +04:00
copyright = (u'1997-2011 by Secret Labs AB,'
u' 1995-2011 by Fredrik Lundh, 2010-2013 Alex Clark')
# The short X.Y version.
2013-10-07 07:48:18 +04:00
version = PIL.PILLOW_VERSION
# The full version, including alpha/beta/rc tags.
2013-10-07 07:48:18 +04:00
release = version
2013-10-09 03:19:35 +04:00
# currently excluding autodoc'd plugs
2013-10-07 09:43:32 +04:00
exclude_patterns = ['_build', 'plugins.rst']
# The name of the Pygments (syntax highlighting) style to use.
pygments_style = 'sphinx'
2013-10-09 03:19:35 +04:00
### HTML output ###
2013-10-07 07:36:05 +04:00
from better import better_theme_path
html_theme_path = [better_theme_path]
html_theme = 'better'
2013-10-07 07:46:38 +04:00
html_title = "Pillow v{release} (PIL fork)".format(release=release)
2013-10-07 07:36:05 +04:00
html_short_title = "Home"
html_static_path = ['_static']
2013-10-07 07:36:05 +04:00
html_theme_options = {}
2013-10-07 07:36:05 +04:00
html_sidebars = {
2013-10-09 03:34:24 +04:00
'**': ['localtoc.html', 'sourcelink.html', 'sidebarhelp.html',
'searchbox.html'],
2013-10-09 04:23:39 +04:00
'index': ['globaltoc.html', 'sidebarhelp.html', 'searchbox.html'],
2013-10-07 07:36:05 +04:00
}
# Output file base name for HTML help builder.
2013-10-09 03:19:35 +04:00
htmlhelp_basename = 'Pillowdoc'
2013-10-09 03:19:35 +04:00
### LaTeX output (RtD PDF output as well) ###
2013-10-09 03:19:35 +04:00
latex_elements = {}
latex_documents = [
2013-10-09 03:19:35 +04:00
('index', 'Pillow.tex', u'Pillow (PIL fork) Documentation', u'Author',
'manual'),
]
2013-10-07 04:29:30 +04:00
# skip_api_docs setting will skip PIL.rst if True. Used for working on the
# guides; makes livereload basically instantaneous.
def setup(app):
app.add_config_value('skip_api_docs', False, True)
skip_api_docs = False
if skip_api_docs:
2013-10-07 09:43:32 +04:00
exclude_patterns += ['PIL.rst']