| OLD | NEW |
| 1 # -*- coding: utf-8 -*- | 1 # -*- coding: utf-8 -*- |
| 2 # Licensed under the Apache License: http://www.apache.org/licenses/LICENSE-2.0 |
| 3 # For details: https://bitbucket.org/ned/coveragepy/src/default/NOTICE.txt |
| 4 |
| 2 # | 5 # |
| 3 # altgraph documentation build configuration file, created by | 6 # coverage.py documentation build configuration file, created by |
| 4 # sphinx-quickstart on Tue Aug 31 11:04:49 2010. | 7 # sphinx-quickstart on Wed May 13 22:18:33 2009. |
| 5 # | 8 # |
| 6 # This file is execfile()d with the current directory set to its containing dir. | 9 # This file is execfile()d with the current directory set to its containing dir. |
| 7 # | 10 # |
| 8 # Note that not all possible configuration values are present in this | 11 # Note that not all possible configuration values are present in this |
| 9 # autogenerated file. | 12 # autogenerated file. |
| 10 # | 13 # |
| 11 # All configuration values have a default; values that are commented out | 14 # All configuration values have a default; values that are commented out |
| 12 # serve to show the default. | 15 # serve to show the default. |
| 13 | 16 |
| 14 import sys, os | 17 import sys, os |
| 15 | 18 |
| 16 def get_version(): | |
| 17 fn = os.path.join( | |
| 18 os.path.dirname(os.path.dirname(os.path.abspath(__file__))), | |
| 19 'setup.cfg') | |
| 20 for ln in open(fn): | |
| 21 if ln.startswith('version'): | |
| 22 version = ln.split('=')[-1].strip() | |
| 23 return version | |
| 24 | |
| 25 # If extensions (or modules to document with autodoc) are in another directory, | 19 # If extensions (or modules to document with autodoc) are in another directory, |
| 26 # add these directories to sys.path here. If the directory is relative to the | 20 # add these directories to sys.path here. If the directory is relative to the |
| 27 # documentation root, use os.path.abspath to make it absolute, like shown here. | 21 # documentation root, use os.path.abspath to make it absolute, like shown here. |
| 28 #sys.path.append(os.path.abspath('.')) | 22 #sys.path.append(os.path.abspath('.')) |
| 29 sys.path.insert(0, | 23 |
| 30 os.path.dirname(os.path.dirname(os.path.abspath(__file__)))) | 24 # on_rtd is whether we are on readthedocs.org |
| 25 on_rtd = os.environ.get('READTHEDOCS', None) == 'True' |
| 31 | 26 |
| 32 # -- General configuration ----------------------------------------------------- | 27 # -- General configuration ----------------------------------------------------- |
| 33 | 28 |
| 34 # Add any Sphinx extension module names here, as strings. They can be extensions | 29 # Add any Sphinx extension module names here, as strings. They can be extensions |
| 35 # coming with Sphinx (named 'sphinx.ext.*') or your custom ones. | 30 # coming with Sphinx (named 'sphinx.ext.*') or your custom ones. |
| 36 extensions = ['sphinx.ext.intersphinx', 'sphinx.ext.todo', 'sphinx.ext.autodoc'
] | 31 extensions = [ |
| 32 'sphinx.ext.autodoc', |
| 33 'sphinx.ext.todo', |
| 34 'sphinx.ext.ifconfig', |
| 35 'sphinxcontrib.spelling', |
| 36 ] |
| 37 | 37 |
| 38 # Add any paths that contain templates here, relative to this directory. | 38 # Add any paths that contain templates here, relative to this directory. |
| 39 templates_path = ['_templates'] | 39 templates_path = ['_templates'] |
| 40 | 40 |
| 41 # The suffix of source filenames. | 41 # The suffix of source filenames. |
| 42 source_suffix = '.rst' | 42 source_suffix = '.rst' |
| 43 | 43 |
| 44 # The encoding of source files. | 44 # The encoding of source files. |
| 45 #source_encoding = 'utf-8' | 45 #source_encoding = 'utf-8' |
| 46 | 46 |
| 47 # The master toctree document. | 47 # The master toctree document. |
| 48 master_doc = 'index' | 48 master_doc = 'index' |
| 49 | 49 |
| 50 # General information about the project. | 50 # General information about the project. |
| 51 project = u'altgraph' | 51 project = u'Coverage.py' |
| 52 copyright = u'2010-2011, Ronald Oussoren, Bob Ippolito, 2004 Istvan Albert' | 52 copyright = u'2009\N{EN DASH}2015, Ned Batchelder' |
| 53 | 53 |
| 54 # The version info for the project you're documenting, acts as replacement for | 54 # The version info for the project you're documenting, acts as replacement for |
| 55 # |version| and |release|, also used in various other places throughout the | 55 # |version| and |release|, also used in various other places throughout the |
| 56 # built documents. | 56 # built documents. |
| 57 # | 57 # |
| 58 # The short X.Y version. | 58 # The short X.Y version. |
| 59 version = get_version() | 59 version = '4.0' |
| 60 # The full version, including alpha/beta/rc tags. | 60 # The full version, including alpha/beta/rc tags. |
| 61 release = version | 61 release = '4.0' |
| 62 | 62 |
| 63 # The language for content autogenerated by Sphinx. Refer to documentation | 63 # The language for content autogenerated by Sphinx. Refer to documentation |
| 64 # for a list of supported languages. | 64 # for a list of supported languages. |
| 65 #language = None | 65 #language = None |
| 66 | 66 |
| 67 # There are two options for replacing |today|: either, you set today to some | 67 # There are two options for replacing |today|: either, you set today to some |
| 68 # non-false value, then it is used: | 68 # non-false value, then it is used: |
| 69 #today = '' | 69 #today = '' |
| 70 # Else, today_fmt is used as the format for a strftime call. | 70 # Else, today_fmt is used as the format for a strftime call. |
| 71 #today_fmt = '%B %d, %Y' | 71 #today_fmt = '%B %d, %Y' |
| (...skipping 18 matching lines...) Expand all Loading... |
| 90 # If true, sectionauthor and moduleauthor directives will be shown in the | 90 # If true, sectionauthor and moduleauthor directives will be shown in the |
| 91 # output. They are ignored by default. | 91 # output. They are ignored by default. |
| 92 #show_authors = False | 92 #show_authors = False |
| 93 | 93 |
| 94 # The name of the Pygments (syntax highlighting) style to use. | 94 # The name of the Pygments (syntax highlighting) style to use. |
| 95 pygments_style = 'sphinx' | 95 pygments_style = 'sphinx' |
| 96 | 96 |
| 97 # A list of ignored prefixes for module index sorting. | 97 # A list of ignored prefixes for module index sorting. |
| 98 #modindex_common_prefix = [] | 98 #modindex_common_prefix = [] |
| 99 | 99 |
| 100 # -- Options for HTML output --------------------------------------------------- |
| 100 | 101 |
| 101 # -- Options for HTML output --------------------------------------------------- | 102 #html_translator_class = "px_xlator.PxTranslator" |
| 102 | 103 |
| 103 # The theme to use for HTML and HTML Help pages. Major themes that come with | 104 # The theme to use for HTML and HTML Help pages. Major themes that come with |
| 104 # Sphinx are currently 'default' and 'sphinxdoc'. | 105 # Sphinx are currently 'default' and 'sphinxdoc'. |
| 105 html_theme = 'nature' | 106 #html_theme = 'default' |
| 107 |
| 108 if not on_rtd: # only import and set the theme if we're building docs locally |
| 109 import sphinx_rtd_theme |
| 110 html_theme = 'sphinx_rtd_theme' |
| 111 html_theme_path = [sphinx_rtd_theme.get_html_theme_path()] |
| 112 |
| 113 # otherwise, readthedocs.org uses their theme by default, so no need to specify
it |
| 114 |
| 106 | 115 |
| 107 # Theme options are theme-specific and customize the look and feel of a theme | 116 # Theme options are theme-specific and customize the look and feel of a theme |
| 108 # further. For a list of options available for each theme, see the | 117 # further. For a list of options available for each theme, see the |
| 109 # documentation. | 118 # documentation. |
| 110 #html_theme_options = {} | 119 #html_theme_options = {} |
| 111 | 120 |
| 121 #html_style = "neds.css" |
| 122 |
| 123 #html_add_permalinks = "" |
| 124 |
| 112 # Add any paths that contain custom themes here, relative to this directory. | 125 # Add any paths that contain custom themes here, relative to this directory. |
| 113 #html_theme_path = [] | 126 html_theme_path = ['_templates'] |
| 114 | 127 |
| 115 # The name for this set of Sphinx documents. If None, it defaults to | 128 # The name for this set of Sphinx documents. If None, it defaults to |
| 116 # "<project> v<release> documentation". | 129 # "<project> v<release> documentation". |
| 117 #html_title = None | 130 #html_title = None |
| 118 | 131 |
| 119 # A shorter title for the navigation bar. Default is the same as html_title. | 132 # A shorter title for the navigation bar. Default is the same as html_title. |
| 120 #html_short_title = None | 133 #html_short_title = None |
| 121 | 134 |
| 122 # The name of an image file (relative to this directory) to place at the top | 135 # The name of an image file (relative to this directory) to place at the top |
| 123 # of the sidebar. | 136 # of the sidebar. |
| 124 #html_logo = None | 137 #html_logo = None |
| 125 | 138 |
| 126 # The name of an image file (within the static path) to use as favicon of the | 139 # The name of an image file (within the static path) to use as favicon of the |
| 127 # docs. This file should be a Windows icon file (.ico) being 16x16 or 32x32 | 140 # docs. This file should be a Windows icon file (.ico) being 16x16 or 32x32 |
| 128 # pixels large. | 141 # pixels large. |
| 129 #html_favicon = None | 142 #html_favicon = None |
| 130 | 143 |
| 131 # Add any paths that contain custom static files (such as style sheets) here, | 144 # Add any paths that contain custom static files (such as style sheets) here, |
| 132 # relative to this directory. They are copied after the builtin static files, | 145 # relative to this directory. They are copied after the builtin static files, |
| 133 # so a file named "default.css" will overwrite the builtin "default.css". | 146 # so a file named "default.css" will overwrite the builtin "default.css". |
| 134 html_static_path = ['_static'] | 147 html_static_path = ['_static'] |
| 135 | 148 |
| 136 # If not '', a 'Last updated on:' timestamp is inserted at every page bottom, | 149 # If not '', a 'Last updated on:' timestamp is inserted at every page bottom, |
| 137 # using the given strftime format. | 150 # using the given strftime format. |
| 138 #html_last_updated_fmt = '%b %d, %Y' | 151 #html_last_updated_fmt = '%b %d, %Y' |
| 139 | 152 |
| 140 # If true, SmartyPants will be used to convert quotes and dashes to | 153 # If true, SmartyPants will be used to convert quotes and dashes to |
| 141 # typographically correct entities. | 154 # typographically correct entities. |
| 142 #html_use_smartypants = True | 155 html_use_smartypants = True |
| 143 | 156 |
| 144 # Custom sidebar templates, maps document names to template names. | 157 # Custom sidebar templates, maps document names to template names. |
| 145 #html_sidebars = {} | 158 #html_sidebars = {} |
| 146 | 159 |
| 147 # Additional templates that should be rendered to pages, maps page names to | 160 # Additional templates that should be rendered to pages, maps page names to |
| 148 # template names. | 161 # template names. |
| 149 #html_additional_pages = {} | 162 #html_additional_pages = {} |
| 150 | 163 |
| 151 # If false, no module index is generated. | 164 # If false, no module index is generated. |
| 152 #html_use_modindex = True | 165 html_use_modindex = False |
| 153 | 166 |
| 154 # If false, no index is generated. | 167 # If false, no index is generated. |
| 155 #html_use_index = True | 168 html_use_index = False |
| 156 | 169 |
| 157 # If true, the index is split into individual pages for each letter. | 170 # If true, the index is split into individual pages for each letter. |
| 158 #html_split_index = False | 171 #html_split_index = False |
| 159 | 172 |
| 160 # If true, links to the reST sources are added to the pages. | 173 # If true, links to the reST sources are added to the pages. |
| 161 html_show_sourcelink = False | 174 html_show_sourcelink = False |
| 162 | 175 |
| 163 # If true, an OpenSearch description file will be output, and all pages will | 176 # If true, an OpenSearch description file will be output, and all pages will |
| 164 # contain a <link> tag referring to it. The value of this option must be the | 177 # contain a <link> tag referring to it. The value of this option must be the |
| 165 # base URL from which the finished HTML is served. | 178 # base URL from which the finished HTML is served. |
| 166 #html_use_opensearch = '' | 179 #html_use_opensearch = '' |
| 167 | 180 |
| 168 # If nonempty, this is the file name suffix for HTML files (e.g. ".xhtml"). | 181 # If nonempty, this is the file name suffix for HTML files (e.g. ".xhtml"). |
| 169 #html_file_suffix = '' | 182 #html_file_suffix = '.px' |
| 170 | 183 |
| 171 # Output file base name for HTML help builder. | 184 # Output file base name for HTML help builder. |
| 172 htmlhelp_basename = 'altgraphdoc' | 185 htmlhelp_basename = 'coveragepydoc' |
| 186 |
| 187 # -- Spelling --- |
| 188 |
| 189 spelling_word_list_filename = 'dict.txt' |
| 190 spelling_show_suggestions = False |
| 173 | 191 |
| 174 | 192 |
| 175 # -- Options for LaTeX output -------------------------------------------------- | 193 # When auto-doc'ing a class, write the class' docstring and the __init__ docstri
ng |
| 176 | 194 # into the class docs. |
| 177 # The paper size ('letter' or 'a4'). | 195 autoclass_content = "class" |
| 178 #latex_paper_size = 'letter' | |
| 179 | |
| 180 # The font size ('10pt', '11pt' or '12pt'). | |
| 181 #latex_font_size = '10pt' | |
| 182 | |
| 183 # Grouping the document tree into LaTeX files. List of tuples | |
| 184 # (source start file, target name, title, author, documentclass [howto/manual]). | |
| 185 latex_documents = [ | |
| 186 ('index', 'altgraph.tex', u'altgraph Documentation', | |
| 187 u'Ronald Oussoren', 'manual'), | |
| 188 ] | |
| 189 | |
| 190 # The name of an image file (relative to this directory) to place at the top of | |
| 191 # the title page. | |
| 192 #latex_logo = None | |
| 193 | |
| 194 # For "manual" documents, if this is true, then toplevel headings are parts, | |
| 195 # not chapters. | |
| 196 #latex_use_parts = False | |
| 197 | |
| 198 # Additional stuff for the LaTeX preamble. | |
| 199 #latex_preamble = '' | |
| 200 | |
| 201 # Documents to append as an appendix to all manuals. | |
| 202 #latex_appendices = [] | |
| 203 | |
| 204 # If false, no module index is generated. | |
| 205 #latex_use_modindex = True | |
| 206 | 196 |
| 207 | 197 |
| 208 # Example configuration for intersphinx: refer to the Python standard library. | 198 |
| 209 intersphinx_mapping = {'python': ('http://docs.python.org/', None) } | 199 |
| 200 |
| 201 prerelease = bool(max(release).isalpha()) |
| 202 |
| 203 def setup(app): |
| 204 app.add_stylesheet('coverage.css') |
| 205 app.add_config_value('prerelease', False, 'env') |
| 206 app.info("** Prerelease = %r" % prerelease) |
| OLD | NEW |