Fri, 16 Jan 2015 18:13:44 +0100
Integrate suggestion from review to improve consistency with existing code.
1 # -*- coding: utf-8 -*-
2 #
3 # Mock documentation build configuration file, created by
4 # sphinx-quickstart on Mon Nov 17 18:12:00 2008.
5 #
6 # This file is execfile()d with the current directory set to its containing dir.
7 #
8 # The contents of this file are pickled, so don't put values in the namespace
9 # that aren't pickleable (module imports are okay, they're removed automatically).
10 #
11 # All configuration values have a default value; values that are commented out
12 # serve to show the default value.
14 import sys, os
15 sys.path.insert(0, os.path.abspath('..'))
16 from mock import __version__
18 # If your extensions are in another directory, add it here. If the directory
19 # is relative to the documentation root, use os.path.abspath to make it
20 # absolute, like shown here.
21 #sys.path.append(os.path.abspath('some/directory'))
23 # General configuration
24 # ---------------------
26 # Add any Sphinx extension module names here, as strings. They can be extensions
27 # coming with Sphinx (named 'sphinx.ext.*') or your custom ones.
28 extensions = ['sphinx.ext.doctest']
30 doctest_global_setup = """
31 import os
32 import sys
33 import mock
34 from mock import * # yeah, I know :-/
35 import unittest2
36 import __main__
38 if os.getcwd() not in sys.path:
39 sys.path.append(os.getcwd())
41 # keep a reference to __main__
42 sys.modules['__main'] = __main__
44 class ProxyModule(object):
45 def __init__(self):
46 self.__dict__ = globals()
48 sys.modules['__main__'] = ProxyModule()
49 """
51 doctest_global_cleanup = """
52 sys.modules['__main__'] = sys.modules['__main']
53 """
55 html_theme = 'nature'
56 html_theme_options = {}
58 # Add any paths that contain templates here, relative to this directory.
59 #templates_path = ['_templates']
61 # The suffix of source filenames.
62 source_suffix = '.txt'
64 # The master toctree document.
65 master_doc = 'index'
67 # General substitutions.
68 project = u'Mock'
69 copyright = u'2007-2012, Michael Foord & the mock team'
71 # The default replacements for |version| and |release|, also used in various
72 # other places throughout the built documents.
73 #
74 # The short X.Y version.
75 version = __version__[:3]
76 # The full version, including alpha/beta/rc tags.
77 release = __version__
79 # There are two options for replacing |today|: either, you set today to some
80 # non-false value, then it is used:
81 #today = ''
82 # Else, today_fmt is used as the format for a strftime call.
83 today_fmt = '%B %d, %Y'
85 # List of documents that shouldn't be included in the build.
86 #unused_docs = []
88 # List of directories, relative to source directories, that shouldn't be searched
89 # for source files.
90 exclude_trees = []
92 # The reST default role (used for this markup: `text`) to use for all documents.
93 #default_role = None
95 # If true, '()' will be appended to :func: etc. cross-reference text.
96 #add_function_parentheses = True
98 # If true, the current module name will be prepended to all description
99 # unit titles (such as .. function::).
100 add_module_names = False
102 # If true, sectionauthor and moduleauthor directives will be shown in the
103 # output. They are ignored by default.
104 #show_authors = False
106 # The name of the Pygments (syntax highlighting) style to use.
107 pygments_style = 'friendly'
110 # Options for HTML output
111 # -----------------------
113 # The style sheet to use for HTML and HTML Help pages. A file of that name
114 # must exist either in Sphinx' static/ path, or in one of the custom paths
115 # given in html_static_path.
116 #html_style = 'adctheme.css'
118 # The name for this set of Sphinx documents. If None, it defaults to
119 # "<project> v<release> documentation".
120 #html_title = None
122 # A shorter title for the navigation bar. Default is the same as html_title.
123 #html_short_title = None
125 # The name of an image file (relative to this directory) to place at the top
126 # of the sidebar.
127 #html_logo = None
129 # The name of an image file (within the static path) to use as favicon of the
130 # docs. This file should be a Windows icon file (.ico) being 16x16 or 32x32
131 # pixels large.
132 #html_favicon = None
134 # Add any paths that contain custom static files (such as style sheets) here,
135 # relative to this directory. They are copied after the builtin static files,
136 # so a file named "default.css" will overwrite the builtin "default.css".
137 #html_static_path = ['_static']
139 # If not '', a 'Last updated on:' timestamp is inserted at every page bottom,
140 # using the given strftime format.
141 html_last_updated_fmt = '%b %d, %Y'
143 # If true, SmartyPants will be used to convert quotes and dashes to
144 # typographically correct entities.
145 #html_use_smartypants = True
147 # Custom sidebar templates, maps document names to template names.
148 #html_sidebars = {}
150 # Additional templates that should be rendered to pages, maps page names to
151 # template names.
152 #html_additional_pages = {}
154 # If false, no module index is generated.
155 html_use_modindex = False
157 # If false, no index is generated.
158 #html_use_index = True
160 # If true, the index is split into individual pages for each letter.
161 #html_split_index = False
163 # If true, the reST sources are included in the HTML build as _sources/<name>.
164 #html_copy_source = True
166 # If true, an OpenSearch description file will be output, and all pages will
167 # contain a <link> tag referring to it. The value of this option must be the
168 # base URL from which the finished HTML is served.
169 #html_use_opensearch = ''
171 # If nonempty, this is the file name suffix for HTML files (e.g. ".xhtml").
172 #html_file_suffix = ''
174 # Output file base name for HTML help builder.
175 htmlhelp_basename = 'Mockdoc'
178 # Options for LaTeX output
179 # ------------------------
181 # The paper size ('letter' or 'a4').
182 #latex_paper_size = 'letter'
184 # The font size ('10pt', '11pt' or '12pt').
185 latex_font_size = '12pt'
187 # Grouping the document tree into LaTeX files. List of tuples
188 # (source start file, target name, title, author, document class [howto/manual]).
189 latex_documents = [
190 ('index', 'Mock.tex', u'Mock Documentation',
191 u'Michael Foord', 'manual'),
192 ]
194 # The name of an image file (relative to this directory) to place at the top of
195 # the title page.
196 #latex_logo = None
198 # For "manual" documents, if this is true, then toplevel headings are parts,
199 # not chapters.
200 #latex_use_parts = False
202 # Additional stuff for the LaTeX preamble.
203 #latex_preamble = ''
205 # Documents to append as an appendix to all manuals.
206 #latex_appendices = []
208 # If false, no module index is generated.
209 latex_use_modindex = False