Debian Codegraph @

testing/web-platform/tests/tools/third_party/atomicwrites/docs/conf.py

raw
1 #!/usr/bin/env python
2
3 import os
4 import sys
5 import pkg_resources
6
7 extensions = [
8 'sphinx.ext.autodoc',
9 'sphinx.ext.intersphinx',
10 'sphinx.ext.viewcode',
11 ]
12
13 # Add any paths that contain templates here, relative to this directory.
14 templates_path = ['_templates']
15
16 # The suffix of source filenames.
17 source_suffix = '.rst'
18
19 # The master toctree document.
20 master_doc = 'index'
21
22 # General information about the project.
23 project = 'atomicwrites'
24 copyright = '2015, Markus Unterwaditzer'
25
26 try:
27 # The full version, including alpha/beta/rc tags.
28 release = pkg_resources.require('atomicwrites')[0].version
29 except pkg_resources.DistributionNotFound:
30 print('To build the documentation, the distribution information of '
31 'atomicwrites has to be available. Run "setup.py develop" to do '
32 'this.')
33 sys.exit(1)
34
35 version = '.'.join(release.split('.')[:2]) # The short X.Y version.
36
37 on_rtd = os.environ.get('READTHEDOCS', None) == 'True'
38
39 try:
40 import sphinx_rtd_theme
41 html_theme = 'sphinx_rtd_theme'
42 html_theme_path = [sphinx_rtd_theme.get_html_theme_path()]
43 except ImportError:
44 html_theme = 'default'
45 if not on_rtd:
46 print('-' * 74)
47 print('Warning: sphinx-rtd-theme not installed, building with default '
48 'theme.')
49 print('-' * 74)
50
51
52 # List of patterns, relative to source directory, that match files and
53 # directories to ignore when looking for source files.
54 exclude_patterns = ['_build']
55
56 # The name of the Pygments (syntax highlighting) style to use.
57 pygments_style = 'sphinx'
58
59 # Add any paths that contain custom static files (such as style sheets) here,
60 # relative to this directory. They are copied after the builtin static files,
61 # so a file named "default.css" will overwrite the builtin "default.css".
62 html_static_path = ['_static']
63
64
65 # Output file base name for HTML help builder.
66 htmlhelp_basename = 'atomicwritesdoc'
67
68
69 # -- Options for LaTeX output ---------------------------------------------
70
71 latex_elements = {}
72
73 # Grouping the document tree into LaTeX files. List of tuples
74 # (source start file, target name, title,
75 # author, documentclass [howto, manual, or own class]).
76 latex_documents = [
77 ('index', 'atomicwrites.tex', 'atomicwrites Documentation',
78 'Markus Unterwaditzer', 'manual'),
79 ]
80
81 # One entry per manual page. List of tuples
82 # (source start file, name, description, authors, manual section).
83 man_pages = [
84 ('index', 'atomicwrites', 'atomicwrites Documentation',
85 ['Markus Unterwaditzer'], 1)
86 ]
87
88 # Grouping the document tree into Texinfo files. List of tuples
89 # (source start file, target name, title, author,
90 # dir menu entry, description, category)
91 texinfo_documents = [
92 ('index', 'atomicwrites', 'atomicwrites Documentation',
93 'Markus Unterwaditzer', 'atomicwrites', 'One line description of project.',
94 'Miscellaneous'),
95 ]
96
97 # Bibliographic Dublin Core info.
98 epub_title = 'atomicwrites'
99 epub_author = 'Markus Unterwaditzer'
100 epub_publisher = 'Markus Unterwaditzer'
101 epub_copyright = '2015, Markus Unterwaditzer'
102
103 # A list of files that should not be packed into the epub file.
104 epub_exclude_files = ['search.html']
105
106 # Example configuration for intersphinx: refer to the Python standard library.
107 intersphinx_mapping = {'http://docs.python.org/': None}