psutil
1# -*- coding: utf-8 -*-
2
3# Copyright (c) 2009, Giampaolo Rodola'. All rights reserved.
4# Use of this source code is governed by a BSD-style license that can be
5# found in the LICENSE file.
6
7# psutil documentation build configuration file, created by
8# sphinx-quickstart on Wed Oct 19 21:54:30 2016.
9#
10# This file is execfile()d with the current directory set to its
11# containing dir.
12#
13# Note that not all possible configuration values are present in this
14# autogenerated file.
15#
16# All configuration values have a default; values that are commented out
17# serve to show the default.
18
19# If extensions (or modules to document with autodoc) are in another directory,
20# add these directories to sys.path here. If the directory is relative to the
21# documentation root, use os.path.abspath to make it absolute, like shown here.
22#
23# import os
24# import sys
25# sys.path.insert(0, os.path.abspath('.'))
26
27# -- General configuration ------------------------------------------------
28
29import ast30import datetime31import os32
33
34PROJECT_NAME = "psutil"35AUTHOR = "Giampaolo Rodola"36THIS_YEAR = str(datetime.datetime.now().year)37HERE = os.path.abspath(os.path.dirname(__file__))38
39
40def get_version():41INIT = os.path.abspath(os.path.join(HERE, '../psutil/__init__.py'))42with open(INIT) as f:43for line in f:44if line.startswith('__version__'):45ret = ast.literal_eval(line.strip().split(' = ')[1])46assert ret.count('.') == 2, ret47for num in ret.split('.'):48assert num.isdigit(), ret49return ret50msg = "couldn't find version string"51raise ValueError(msg)52
53
54VERSION = get_version()55
56# If your documentation needs a minimal Sphinx version, state it here.
57#
58# needs_sphinx = '1.0'
59
60# Add any Sphinx extension module names here, as strings. They can be
61# extensions coming with Sphinx (named 'sphinx.ext.*') or your custom
62# ones.
63extensions = [64'sphinx.ext.autodoc',65'sphinx.ext.coverage',66'sphinx.ext.imgmath',67'sphinx.ext.viewcode',68'sphinx.ext.intersphinx',69]
70
71# Add any paths that contain templates here, relative to this directory.
72templates_path = ['_templates']73
74# The suffix(es) of source filenames.
75# You can specify multiple suffix as a list of string:
76#
77# source_suffix = ['.rst', '.md']
78source_suffix = '.rst'79
80# The encoding of source files.
81#
82# source_encoding = 'utf-8-sig'
83
84# The master toctree document.
85master_doc = 'index'86
87# General information about the project.
88project = PROJECT_NAME89copyright = '2009-%s, %s' % (THIS_YEAR, AUTHOR)90author = AUTHOR91
92# The version info for the project you're documenting, acts as replacement for
93# |version| and |release|, also used in various other places throughout the
94# built documents.
95#
96# The short X.Y version.
97version = VERSION98# The full version, including alpha/beta/rc tags.
99release = VERSION100
101# The language for content autogenerated by Sphinx. Refer to documentation
102# for a list of supported languages.
103#
104# This is also used if you do content translation via gettext catalogs.
105# Usually you set "language" from the command line for these cases.
106language = "eng"107
108# There are two options for replacing |today|: either, you set today to some
109# non-false value, then it is used:
110#
111# today = ''
112#
113# Else, today_fmt is used as the format for a strftime call.
114#
115# today_fmt = '%B %d, %Y'
116
117# List of patterns, relative to source directory, that match files and
118# directories to ignore when looking for source files.
119# This patterns also effect to html_static_path and html_extra_path
120exclude_patterns = ['_build', 'Thumbs.db', '.DS_Store', 'DEVGUIDE.rst']121
122# The reST default role (used for this markup: `text`) to use for all
123# documents.
124#
125# default_role = None
126
127# If true, '()' will be appended to :func: etc. cross-reference text.
128#
129# add_function_parentheses = True
130
131# If true, the current module name will be prepended to all description
132# unit titles (such as .. function::).
133#
134# add_module_names = True
135
136# If true, sectionauthor and moduleauthor directives will be shown in the
137# output. They are ignored by default.
138#
139# show_authors = False
140
141# The name of the Pygments (syntax highlighting) style to use.
142pygments_style = 'sphinx'143
144# A list of ignored prefixes for module index sorting.
145# modindex_common_prefix = []
146
147# If true, keep warnings as "system message" paragraphs in the built documents.
148# keep_warnings = False
149
150# If true, `todo` and `todoList` produce output, else they produce nothing.
151todo_include_todos = False152
153
154# -- Options for HTML output ----------------------------------------------
155
156# The theme to use for HTML and HTML Help pages. See the documentation for
157# a list of builtin themes.
158#
159html_theme = 'sphinx_rtd_theme'160
161# Theme options are theme-specific and customize the look and feel of a theme
162# further. For a list of options available for each theme, see the
163# documentation.
164#
165# html_theme_options = {}
166
167# Add any paths that contain custom themes here, relative to this directory.
168# html_theme_path = []
169
170# The name for this set of Sphinx documents.
171# "<project> v<release> documentation" by default.
172#
173# html_title = u'psutil v1.0'
174
175# A shorter title for the navigation bar. Default is the same as html_title.
176#
177# html_short_title = None
178
179# The name of an image file (relative to this directory) to place at the top
180# of the sidebar.
181#
182# html_logo = None
183
184# The name of an image file (relative to this directory) to use as a favicon of
185# the docs. This file should be a Windows icon file (.ico) being 16x16 or
186# 32x32 pixels large.
187
188
189# Add any paths that contain custom static files (such as style sheets) here,
190# relative to this directory. They are copied after the builtin static files,
191# so a file named "default.css" will overwrite the builtin "default.css".
192html_static_path = ['_static']193
194# Add any extra paths that contain custom files (such as robots.txt or
195# .htaccess) here, relative to this directory. These files are copied
196# directly to the root of the documentation.
197#
198# html_extra_path = []
199
200# If not None, a 'Last updated on:' timestamp is inserted at every page
201# bottom, using the given strftime format.
202# The empty string is equivalent to '%b %d, %Y'.
203#
204# html_last_updated_fmt = None
205
206# If true, SmartyPants will be used to convert quotes and dashes to
207# typographically correct entities.
208#
209# html_use_smartypants = True
210
211# Custom sidebar templates, maps document names to template names.
212#
213# html_sidebars = {}
214
215# Additional templates that should be rendered to pages, maps page names to
216# template names.
217#
218# html_additional_pages = {}
219
220# If false, no module index is generated.
221#
222# html_domain_indices = True
223
224# If false, no index is generated.
225#
226# html_use_index = True
227
228# If true, the index is split into individual pages for each letter.
229#
230# html_split_index = False
231
232# If true, links to the reST sources are added to the pages.
233#
234# html_show_sourcelink = True
235
236# If true, "Created using Sphinx" is shown in the HTML footer. Default is True.
237#
238# html_show_sphinx = True
239
240# If true, "(C) Copyright ..." is shown in the HTML footer. Default is True.
241#
242# html_show_copyright = True
243
244# If true, an OpenSearch description file will be output, and all pages will
245# contain a <link> tag referring to it. The value of this option must be the
246# base URL from which the finished HTML is served.
247#
248# html_use_opensearch = ''
249
250# This is the file name suffix for HTML files (e.g. ".xhtml").
251# html_file_suffix = None
252
253# Language to be used for generating the HTML full-text search index.
254# Sphinx supports the following languages:
255# 'da', 'de', 'en', 'es', 'fi', 'fr', 'hu', 'it', 'ja'
256# 'nl', 'no', 'pt', 'ro', 'ru', 'sv', 'tr', 'zh'
257#
258# html_search_language = 'en'
259
260# A dictionary with options for the search language support, empty by default.
261# 'ja' uses this config value.
262# 'zh' user can custom change `jieba` dictionary path.
263#
264# html_search_options = {'type': 'default'}
265
266# The name of a javascript file (relative to the configuration directory) that
267# implements a search results scorer. If empty, the default will be used.
268#
269# html_search_scorer = 'scorer.js'
270
271# Output file base name for HTML help builder.
272htmlhelp_basename = '%s-doc' % PROJECT_NAME273
274# -- Options for LaTeX output ---------------------------------------------
275
276latex_elements = {277# The paper size ('letterpaper' or 'a4paper').278#279# 'papersize': 'letterpaper',280# The font size ('10pt', '11pt' or '12pt').281#282# 'pointsize': '10pt',283# Additional stuff for the LaTeX preamble.284#285# 'preamble': '',286# Latex figure (float) alignment287#288# 'figure_align': 'htbp',289}
290
291# Grouping the document tree into LaTeX files. List of tuples
292# (source start file, target name, title,
293# author, documentclass [howto, manual, or own class]).
294latex_documents = [295(master_doc, 'psutil.tex', 'psutil Documentation', AUTHOR, 'manual')296]
297
298# The name of an image file (relative to this directory) to place at the top of
299# the title page.
300#
301# latex_logo = None
302
303# For "manual" documents, if this is true, then toplevel headings are parts,
304# not chapters.
305#
306# latex_use_parts = False
307
308# If true, show page references after internal links.
309#
310# latex_show_pagerefs = False
311
312# If true, show URL addresses after external links.
313#
314# latex_show_urls = False
315
316# Documents to append as an appendix to all manuals.
317#
318# latex_appendices = []
319
320# It false, will not define \strong, \code, itleref, \crossref ... but only
321# \sphinxstrong, ..., \sphinxtitleref, ... To help avoid clash with user added
322# packages.
323#
324# latex_keep_old_macro_names = True
325
326# If false, no module index is generated.
327#
328# latex_domain_indices = True
329
330
331# -- Options for manual page output ---------------------------------------
332
333# One entry per manual page. List of tuples
334# (source start file, name, description, authors, manual section).
335man_pages = [(master_doc, 'psutil', 'psutil Documentation', [author], 1)]336
337# If true, show URL addresses after external links.
338#
339# man_show_urls = False
340
341
342# -- Options for Texinfo output -------------------------------------------
343
344# Grouping the document tree into Texinfo files. List of tuples
345# (source start file, target name, title, author,
346# dir menu entry, description, category)
347texinfo_documents = [(348master_doc,349'psutil',350'psutil Documentation',351author,352'psutil',353'One line description of project.',354'Miscellaneous',355)]356
357# Documents to append as an appendix to all manuals.
358#
359# texinfo_appendices = []
360
361# If false, no module index is generated.
362#
363# texinfo_domain_indices = True
364
365# How to display URL addresses: 'footnote', 'no', or 'inline'.
366#
367# texinfo_show_urls = 'footnote'
368
369# If true, do not generate a @detailmenu in the "Top" node's menu.
370#
371# texinfo_no_detailmenu = False
372
373
374html_context = {375'css_files': [376'https://media.readthedocs.org/css/sphinx_rtd_theme.css',377'https://media.readthedocs.org/css/readthedocs-doc-embed.css',378'_static/css/custom.css',379]380}
381