conf.py 8.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274
  1. # -*- coding: utf-8 -*-
  2. #
  3. # urllib3 documentation build configuration file, created by
  4. # sphinx-quickstart on Wed Oct 5 13:15:40 2011.
  5. #
  6. # This file is execfile()d with the current directory set to its containing dir.
  7. #
  8. # Note that not all possible configuration values are present in this
  9. # autogenerated file.
  10. #
  11. # All configuration values have a default; values that are commented out
  12. # serve to show the default.
  13. from datetime import date
  14. import os
  15. import sys
  16. import alabaster
  17. # If extensions (or modules to document with autodoc) are in another directory,
  18. # add these directories to sys.path here. If the directory is relative to the
  19. # documentation root, use os.path.abspath to make it absolute, like shown here.
  20. root_path = os.path.abspath(os.path.join(os.path.dirname(__file__), '..'))
  21. sys.path.insert(0, root_path)
  22. # Mock some expensive/platform-specific modules so build will work.
  23. # (https://read-the-docs.readthedocs.io/en/latest/faq.html#\
  24. # i-get-import-errors-on-libraries-that-depend-on-c-modules)
  25. import mock
  26. class MockModule(mock.Mock):
  27. @classmethod
  28. def __getattr__(cls, name):
  29. return MockModule()
  30. MOCK_MODULES = (
  31. 'ntlm',
  32. )
  33. sys.modules.update((mod_name, MockModule()) for mod_name in MOCK_MODULES)
  34. import urllib3
  35. # -- General configuration -----------------------------------------------------
  36. # If your documentation needs a minimal Sphinx version, state it here.
  37. #needs_sphinx = '1.0'
  38. # Add any Sphinx extension module names here, as strings. They can be extensions
  39. # coming with Sphinx (named 'sphinx.ext.*') or your custom ones.
  40. extensions = [
  41. 'alabaster',
  42. 'sphinx.ext.autodoc',
  43. 'sphinx.ext.doctest',
  44. 'sphinx.ext.intersphinx',
  45. ]
  46. # Test code blocks only when explicitly specified
  47. doctest_test_doctest_blocks = ''
  48. # Add any paths that contain templates here, relative to this directory.
  49. templates_path = ['_templates']
  50. # The suffix of source filenames.
  51. source_suffix = '.rst'
  52. # The encoding of source files.
  53. #source_encoding = 'utf-8-sig'
  54. # The master toctree document.
  55. master_doc = 'index'
  56. # General information about the project.
  57. project = u'urllib3'
  58. copyright = u'{year}, Andrey Petrov'.format(year=date.today().year)
  59. # The version info for the project you're documenting, acts as replacement for
  60. # |version| and |release|, also used in various other places throughout the
  61. # built documents.
  62. #
  63. # The short X.Y version.
  64. version = urllib3.__version__
  65. # The full version, including alpha/beta/rc tags.
  66. release = version
  67. # The language for content autogenerated by Sphinx. Refer to documentation
  68. # for a list of supported languages.
  69. #language = None
  70. # There are two options for replacing |today|: either, you set today to some
  71. # non-false value, then it is used:
  72. #today = ''
  73. # Else, today_fmt is used as the format for a strftime call.
  74. #today_fmt = '%B %d, %Y'
  75. # List of patterns, relative to source directory, that match files and
  76. # directories to ignore when looking for source files.
  77. exclude_patterns = ['_build']
  78. # The reST default role (used for this markup: `text`) to use for all documents.
  79. #default_role = None
  80. # If true, '()' will be appended to :func: etc. cross-reference text.
  81. #add_function_parentheses = True
  82. # If true, the current module name will be prepended to all description
  83. # unit titles (such as .. function::).
  84. #add_module_names = True
  85. # If true, sectionauthor and moduleauthor directives will be shown in the
  86. # output. They are ignored by default.
  87. #show_authors = False
  88. # The name of the Pygments (syntax highlighting) style to use.
  89. pygments_style = 'sphinx'
  90. # A list of ignored prefixes for module index sorting.
  91. #modindex_common_prefix = []
  92. # -- Options for HTML output ---------------------------------------------------
  93. # The theme to use for HTML and HTML Help pages. See the documentation for
  94. # a list of builtin themes.
  95. html_theme = 'alabaster'
  96. # Theme options are theme-specific and customize the look and feel of a theme
  97. # further. For a list of options available for each theme, see the
  98. # documentation.
  99. html_theme_options = {
  100. 'description': 'Sanity-friendly HTTP client.',
  101. 'github_user': 'shazow',
  102. 'github_repo': 'urllib3',
  103. 'github_button': False,
  104. 'github_banner': True,
  105. 'travis_button': True,
  106. 'show_powered_by': False,
  107. 'font_family': "'Roboto', Georgia, sans",
  108. 'head_font_family': "'Roboto', Georgia, serif",
  109. 'code_font_family': "'Roboto Mono', 'Consolas', monospace",
  110. }
  111. # Add any paths that contain custom themes here, relative to this directory.
  112. html_theme_path = [alabaster.get_path()]
  113. # The name for this set of Sphinx documents. If None, it defaults to
  114. # "<project> v<release> documentation".
  115. #html_title = None
  116. # A shorter title for the navigation bar. Default is the same as html_title.
  117. #html_short_title = None
  118. # The name of an image file (relative to this directory) to place at the top
  119. # of the sidebar.
  120. #html_logo = None
  121. # The name of an image file (within the static path) to use as favicon of the
  122. # docs. This file should be a Windows icon file (.ico) being 16x16 or 32x32
  123. # pixels large.
  124. #html_favicon = None
  125. # Add any paths that contain custom static files (such as style sheets) here,
  126. # relative to this directory. They are copied after the builtin static files,
  127. # so a file named "default.css" will overwrite the builtin "default.css".
  128. #html_static_path = ['_static']
  129. # If not '', a 'Last updated on:' timestamp is inserted at every page bottom,
  130. # using the given strftime format.
  131. #html_last_updated_fmt = '%b %d, %Y'
  132. # If true, SmartyPants will be used to convert quotes and dashes to
  133. # typographically correct entities.
  134. #html_use_smartypants = True
  135. # Custom sidebar templates, maps document names to template names.
  136. html_sidebars = {
  137. '**': [
  138. 'about.html',
  139. 'navigation.html',
  140. 'relations.html',
  141. 'searchbox.html',
  142. 'donate.html',
  143. ]
  144. }
  145. # Additional templates that should be rendered to pages, maps page names to
  146. # template names.
  147. #html_additional_pages = {}
  148. # If false, no module index is generated.
  149. #html_domain_indices = True
  150. # If false, no index is generated.
  151. #html_use_index = True
  152. # If true, the index is split into individual pages for each letter.
  153. #html_split_index = False
  154. # If true, links to the reST sources are added to the pages.
  155. #html_show_sourcelink = True
  156. # If true, "Created using Sphinx" is shown in the HTML footer. Default is True.
  157. #html_show_sphinx = True
  158. # If true, "(C) Copyright ..." is shown in the HTML footer. Default is True.
  159. #html_show_copyright = True
  160. # If true, an OpenSearch description file will be output, and all pages will
  161. # contain a <link> tag referring to it. The value of this option must be the
  162. # base URL from which the finished HTML is served.
  163. #html_use_opensearch = ''
  164. # This is the file name suffix for HTML files (e.g. ".xhtml").
  165. #html_file_suffix = None
  166. # Output file base name for HTML help builder.
  167. htmlhelp_basename = 'urllib3doc'
  168. # -- Options for LaTeX output --------------------------------------------------
  169. # The paper size ('letter' or 'a4').
  170. #latex_paper_size = 'letter'
  171. # The font size ('10pt', '11pt' or '12pt').
  172. #latex_font_size = '10pt'
  173. # Grouping the document tree into LaTeX files. List of tuples
  174. # (source start file, target name, title, author, documentclass [howto/manual]).
  175. latex_documents = [
  176. ('index', 'urllib3.tex', u'urllib3 Documentation',
  177. u'Andrey Petrov', 'manual'),
  178. ]
  179. # The name of an image file (relative to this directory) to place at the top of
  180. # the title page.
  181. #latex_logo = None
  182. # For "manual" documents, if this is true, then toplevel headings are parts,
  183. # not chapters.
  184. #latex_use_parts = False
  185. # If true, show page references after internal links.
  186. #latex_show_pagerefs = False
  187. # If true, show URL addresses after external links.
  188. #latex_show_urls = False
  189. # Additional stuff for the LaTeX preamble.
  190. #latex_preamble = ''
  191. # Documents to append as an appendix to all manuals.
  192. #latex_appendices = []
  193. # If false, no module index is generated.
  194. #latex_domain_indices = True
  195. # -- Options for manual page output --------------------------------------------
  196. # One entry per manual page. List of tuples
  197. # (source start file, name, description, authors, manual section).
  198. man_pages = [
  199. ('index', 'urllib3', u'urllib3 Documentation',
  200. [u'Andrey Petrov'], 1)
  201. ]
  202. intersphinx_mapping = {
  203. 'python': ('https://docs.python.org/3.5', None),}