We are currently solving the following issue within our repository. Here is the issue text:
--- BEGIN ISSUE ---
manpage documentation is missing all subcommands
Initially reported in Arch Linux as: https://bugs.archlinux.org/task/63223

To reproduce:
```
git clone https://github.com/pypa/pip/
cd pip/docs
PYTHONPATH=$PWD/../src/ sphinx-build -W -b man -d build/doctrees/man man build/man -c html
```

Look in build/man and you will see only one manpage: pip.1

Really quick reproducer: look at a recent Travis CI build for the TOXENV=docs results, for example https://travis-ci.org/pypa/pip/jobs/559973823#L388, and see only one file being written out.

Expectation: There should be lots of manpages, one for each pip subcommand, and linux distro packages which install the docs/build/man/ directory to /usr/share/man/man1/ should be able to read all about pip's many excellent features in their offline documentation reader.

The cause of this breakage is https://github.com/pypa/pip/pull/5724, which reorganized the conf.py layout due to https://github.com/readthedocs/readthedocs.org/issues/1543 but did not adapt the somewhat hacky code to automatically add new entries.

--- END ISSUE ---

Below are some code segments, each from a relevant file. One or more of these files may contain bugs.
--- BEGIN FILES ---
Path: `docs/html/conf.py`
Content:
```
1 # -*- coding: utf-8 -*-
2 #
3 # pip documentation build configuration file, created by
4 # sphinx-quickstart on Tue Apr 22 22:08:49 2008
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 
14 import glob
15 import os
16 import re
17 import sys
18 
19 on_rtd = os.environ.get('READTHEDOCS', None) == 'True'
20 
21 docs_dir = os.path.dirname(os.path.dirname(__file__))
22 # If extensions (or modules to document with autodoc) are in another directory,
23 # add these directories to sys.path here. If the directory is relative to the
24 # documentation root, use os.path.abspath to make it absolute, like shown here.
25 sys.path.insert(0, docs_dir)
26 # sys.path.append(os.path.join(os.path.dirname(__file__), '../'))
27 
28 # -- General configuration ----------------------------------------------------
29 
30 # Add any Sphinx extension module names here, as strings. They can be
31 # extensions coming with Sphinx (named 'sphinx.ext.*') or your custom ones.
32 # extensions = ['sphinx.ext.autodoc']
33 extensions = ['sphinx.ext.extlinks', 'pip_sphinxext', 'sphinx.ext.intersphinx']
34 
35 # intersphinx
36 intersphinx_cache_limit = 0
37 intersphinx_mapping = {
38     'pypug': ('https://packaging.python.org/', None),
39     'pypa': ('https://www.pypa.io/en/latest/', None),
40 }
41 
42 
43 # Add any paths that contain templates here, relative to this directory.
44 templates_path = []
45 
46 # The suffix of source filenames.
47 source_suffix = '.rst'
48 
49 # The encoding of source files.
50 # source_encoding = 'utf-8'
51 
52 # The master toctree document.
53 master_doc = 'index'
54 
55 # General information about the project.
56 project = 'pip'
57 copyright = '2008-2017, PyPA'
58 
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 
65 version = release = 'dev'
66 
67 # Readthedocs seems to install pip as an egg (via setup.py install) which
68 # is somehow resulting in "import pip" picking up an older copy of pip.
69 # Rather than trying to force RTD to install pip properly, we'll simply
70 # read the version direct from the __init__.py file. (Yes, this is
71 # fragile, but it works...)
72 
73 pip_init = os.path.join(docs_dir, '..', 'src', 'pip', '__init__.py')
74 with open(pip_init) as f:
75     for line in f:
76         m = re.match(r'__version__ = "(.*)"', line)
77         if m:
78             __version__ = m.group(1)
79             # The short X.Y version.
80             version = '.'.join(__version__.split('.')[:2])
81             # The full version, including alpha/beta/rc tags.
82             release = __version__
83             break
84 
85 # We have this here because readthedocs plays tricks sometimes and there seems
86 # to be a heisenbug, related to the version of pip discovered. This is here to
87 # help debug that if someone decides to do that in the future.
88 print(version)
89 
90 # The language for content autogenerated by Sphinx. Refer to documentation
91 # for a list of supported languages.
92 # language = None
93 
94 # There are two options for replacing |today|: either, you set today to some
95 # non-false value, then it is used:
96 # today = ''
97 # Else, today_fmt is used as the format for a strftime call.
98 today_fmt = '%B %d, %Y'
99 
100 # List of documents that shouldn't be included in the build.
101 # unused_docs = []
102 
103 # List of directories, relative to source directory, that shouldn't be searched
104 # for source files.
105 exclude_patterns = ['build/']
106 
107 # The reST default role (used for this markup: `text`) to use for all documents
108 # default_role = None
109 
110 # If true, '()' will be appended to :func: etc. cross-reference text.
111 # add_function_parentheses = True
112 
113 # If true, the current module name will be prepended to all description
114 # unit titles (such as .. function::).
115 # add_module_names = True
116 
117 # If true, sectionauthor and moduleauthor directives will be shown in the
118 # output. They are ignored by default.
119 # show_authors = False
120 
121 # The name of the Pygments (syntax highlighting) style to use.
122 pygments_style = 'sphinx'
123 
124 # A list of ignored prefixes for module index sorting.
125 # modindex_common_prefix = []
126 
127 extlinks = {
128     'issue': ('https://github.com/pypa/pip/issues/%s', '#'),
129     'pull': ('https://github.com/pypa/pip/pull/%s', 'PR #'),
130     'pypi': ('https://pypi.org/project/%s', ''),
131 }
132 
133 # -- Options for HTML output --------------------------------------------------
134 
135 # The theme to use for HTML and HTML Help pages.  Major themes that come with
136 # Sphinx are currently 'default' and 'sphinxdoc'.
137 html_theme = "pypa_theme"
138 
139 # Theme options are theme-specific and customize the look and feel of a theme
140 # further.  For a list of options available for each theme, see the
141 # documentation.
142 html_theme_options = {
143     'collapsiblesidebar': True,
144     'externalrefs': True,
145     'navigation_depth': 3,
146     'issues_url': 'https://github.com/pypa/pip/issues'
147 }
148 
149 # Add any paths that contain custom themes here, relative to this directory.
150 
151 # The name for this set of Sphinx documents.  If None, it defaults to
152 # "<project> v<release> documentation".
153 # html_title = None
154 
155 # A shorter title for the navigation bar.  Default is the same as html_title.
156 # html_short_title = None
157 
158 # The name of an image file (relative to this directory) to place at the top
159 # of the sidebar.
160 # html_logo = '_static/piplogo.png'
161 
162 # The name of an image file (within the static path) to use as favicon of the
163 # docs.  This file should be a Windows icon file (.ico) being 16x16 or 32x32
164 # pixels large.
165 # html_favicon = 'favicon.png'
166 
167 # Add any paths that contain custom static files (such as style sheets) here,
168 # relative to this directory. They are copied after the builtin static files,
169 # so a file named "default.css" will overwrite the builtin "default.css".
170 html_static_path = []
171 
172 # If not '', a 'Last updated on:' timestamp is inserted at every page bottom,
173 # using the given strftime format.
174 html_last_updated_fmt = '%b %d, %Y'
175 
176 # If true, the Docutils Smart Quotes transform (originally based on
177 # SmartyPants) will be used to convert characters like quotes and dashes
178 # to typographically correct entities.  The default is True.
179 smartquotes = True
180 
181 # This string, for use with Docutils 0.14 or later, customizes the
182 # SmartQuotes transform. The default of "qDe" converts normal quote
183 # characters ('"' and "'"), en and em dashes ("--" and "---"), and
184 # ellipses "...".
185 #    For now, we disable the conversion of dashes so that long options
186 # like "--find-links" won't render as "-find-links" if included in the
187 # text in places where monospaced type can't be used. For example, backticks
188 # can't be used inside roles like :ref:`--no-index <--no-index>` because
189 # of nesting.
190 smartquotes_action = "qe"
191 
192 # Custom sidebar templates, maps document names to template names.
193 html_sidebars = {
194     '**': ['localtoc.html', 'relations.html'],
195     'index': ['localtoc.html']
196 }
197 
198 # Additional templates that should be rendered to pages, maps page names to
199 # template names.
200 # html_additional_pages = {}
201 
202 # If false, no module index is generated.
203 html_use_modindex = False
204 
205 # If false, no index is generated.
206 html_use_index = False
207 
208 # If true, the index is split into individual pages for each letter.
209 # html_split_index = False
210 
211 # If true, links to the reST sources are added to the pages.
212 html_show_sourcelink = False
213 
214 # If true, an OpenSearch description file will be output, and all pages will
215 # contain a <link> tag referring to it.  The value of this option must be the
216 # base URL from which the finished HTML is served.
217 # html_use_opensearch = ''
218 
219 # If nonempty, this is the file name suffix for HTML files (e.g. ".xhtml").
220 # html_file_suffix = ''
221 
222 # Output file base name for HTML help builder.
223 htmlhelp_basename = 'pipdocs'
224 
225 
226 # -- Options for LaTeX output -------------------------------------------------
227 
228 # The paper size ('letter' or 'a4').
229 # latex_paper_size = 'letter'
230 
231 # The font size ('10pt', '11pt' or '12pt').
232 # latex_font_size = '10pt'
233 
234 # Grouping the document tree into LaTeX files. List of tuples
235 # (source start file, target name, title, author, documentclass [howto/manual])
236 latex_documents = [
237     (
238         'index',
239         'pip.tex',
240         u'pip Documentation',
241         u'pip developers',
242         'manual',
243     ),
244 ]
245 
246 # The name of an image file (relative to this directory) to place at the top of
247 # the title page.
248 # latex_logo = None
249 
250 # For "manual" documents, if this is true, then toplevel headings are parts,
251 # not chapters.
252 # latex_use_parts = False
253 
254 # Additional stuff for the LaTeX preamble.
255 # latex_preamble = ''
256 
257 # Documents to append as an appendix to all manuals.
258 # latex_appendices = []
259 
260 # If false, no module index is generated.
261 # latex_use_modindex = True
262 
263 # -- Options for Manual Pages -------------------------------------------------
264 
265 # List of manual pages generated
266 man_pages = [
267     (
268         'index',
269         'pip',
270         u'package manager for Python packages',
271         u'pip developers',
272         1
273     )
274 ]
275 
276 # Here, we crawl the entire man/commands/ directory and list every file with
277 # appropriate name and details
278 for fname in glob.glob('man/commands/*.rst'):
279     fname_base = fname[4:-4]
280     outname = 'pip-' + fname_base[13:]
281     description = u'description of {} command'.format(
282         outname.replace('-', ' ')
283     )
284 
285     man_pages.append((fname_base, outname, description, u'pip developers', 1))
286
```
--- END FILES ---

Please first localize the bug based on the issue statement, and then generate a patch according to the `git diff` format fenced by three backticks.

Here is an example:

```diff
diff --git a/examples/server_async.py b/examples/server_async.py
--- a/examples/server_async.py
+++ b/examples/server_async.py
@@ -313,4 +313,4 @@
 
 
 if __name__ == "__main__":
-    asyncio.run(run_async_server("."), debug=True)
+    asyncio.run(run_async_server(), debug=True)
diff --git a/examples/server_sync.py b/examples/server_sync.py
--- a/examples/server_sync.py
+++ b/examples/server_sync.py
@@ -313,5 +313,5 @@
 
 
 if __name__ == "__main__":
-    server = run_sync_server(".")
+    server = run_sync_server()
     server.shutdown()

```

diff --git a/docs/html/conf.py b/docs/html/conf.py
--- a/docs/html/conf.py
+++ b/docs/html/conf.py
@@ -275,9 +275,13 @@
 
 # Here, we crawl the entire man/commands/ directory and list every file with
 # appropriate name and details
-for fname in glob.glob('man/commands/*.rst'):
-    fname_base = fname[4:-4]
-    outname = 'pip-' + fname_base[13:]
+man_dir = os.path.join(docs_dir, 'man/')
+raw_subcommands = glob.glob(os.path.join(man_dir, 'commands/*.rst'))
+if not raw_subcommands:
+    raise FileNotFoundError('The individual subcommand manpages could not be found!')
+for fname in raw_subcommands:
+    fname_base = fname[len(man_dir):-4]
+    outname = 'pip-' + fname_base[9:]
     description = u'description of {} command'.format(
         outname.replace('-', ' ')
     )

{"golden_diff": "diff --git a/docs/html/conf.py b/docs/html/conf.py\n--- a/docs/html/conf.py\n+++ b/docs/html/conf.py\n@@ -275,9 +275,13 @@\n \n # Here, we crawl the entire man/commands/ directory and list every file with\n # appropriate name and details\n-for fname in glob.glob('man/commands/*.rst'):\n-    fname_base = fname[4:-4]\n-    outname = 'pip-' + fname_base[13:]\n+man_dir = os.path.join(docs_dir, 'man/')\n+raw_subcommands = glob.glob(os.path.join(man_dir, 'commands/*.rst'))\n+if not raw_subcommands:\n+    raise FileNotFoundError('The individual subcommand manpages could not be found!')\n+for fname in raw_subcommands:\n+    fname_base = fname[len(man_dir):-4]\n+    outname = 'pip-' + fname_base[9:]\n     description = u'description of {} command'.format(\n         outname.replace('-', ' ')\n     )\n", "issue": "manpage documentation is missing all subcommands\nInitially reported in Arch Linux as: https://bugs.archlinux.org/task/63223\r\n\r\nTo reproduce:\r\n```\r\ngit clone https://github.com/pypa/pip/\r\ncd pip/docs\r\nPYTHONPATH=$PWD/../src/ sphinx-build -W -b man -d build/doctrees/man man build/man -c html\r\n```\r\n\r\nLook in build/man and you will see only one manpage: pip.1\r\n\r\nReally quick reproducer: look at a recent Travis CI build for the TOXENV=docs results, for example https://travis-ci.org/pypa/pip/jobs/559973823#L388, and see only one file being written out.\r\n\r\nExpectation: There should be lots of manpages, one for each pip subcommand, and linux distro packages which install the docs/build/man/ directory to /usr/share/man/man1/ should be able to read all about pip's many excellent features in their offline documentation reader.\r\n\r\nThe cause of this breakage is https://github.com/pypa/pip/pull/5724, which reorganized the conf.py layout due to https://github.com/readthedocs/readthedocs.org/issues/1543 but did not adapt the somewhat hacky code to automatically add new entries.\n", "before_files": [{"content": "# -*- coding: utf-8 -*-\n#\n# pip documentation build configuration file, created by\n# sphinx-quickstart on Tue Apr 22 22:08:49 2008\n#\n# This file is execfile()d with the current directory set to its containing dir\n#\n# Note that not all possible configuration values are present in this\n# autogenerated file.\n#\n# All configuration values have a default; values that are commented out\n# serve to show the default.\n\nimport glob\nimport os\nimport re\nimport sys\n\non_rtd = os.environ.get('READTHEDOCS', None) == 'True'\n\ndocs_dir = os.path.dirname(os.path.dirname(__file__))\n# If extensions (or modules to document with autodoc) are in another directory,\n# add these directories to sys.path here. If the directory is relative to the\n# documentation root, use os.path.abspath to make it absolute, like shown here.\nsys.path.insert(0, docs_dir)\n# sys.path.append(os.path.join(os.path.dirname(__file__), '../'))\n\n# -- General configuration ----------------------------------------------------\n\n# Add any Sphinx extension module names here, as strings. They can be\n# extensions coming with Sphinx (named 'sphinx.ext.*') or your custom ones.\n# extensions = ['sphinx.ext.autodoc']\nextensions = ['sphinx.ext.extlinks', 'pip_sphinxext', 'sphinx.ext.intersphinx']\n\n# intersphinx\nintersphinx_cache_limit = 0\nintersphinx_mapping = {\n    'pypug': ('https://packaging.python.org/', None),\n    'pypa': ('https://www.pypa.io/en/latest/', None),\n}\n\n\n# Add any paths that contain templates here, relative to this directory.\ntemplates_path = []\n\n# The suffix of source filenames.\nsource_suffix = '.rst'\n\n# The encoding of source files.\n# source_encoding = 'utf-8'\n\n# The master toctree document.\nmaster_doc = 'index'\n\n# General information about the project.\nproject = 'pip'\ncopyright = '2008-2017, PyPA'\n\n# The version info for the project you're documenting, acts as replacement for\n# |version| and |release|, also used in various other places throughout the\n# built documents.\n#\n# The short X.Y version.\n\nversion = release = 'dev'\n\n# Readthedocs seems to install pip as an egg (via setup.py install) which\n# is somehow resulting in \"import pip\" picking up an older copy of pip.\n# Rather than trying to force RTD to install pip properly, we'll simply\n# read the version direct from the __init__.py file. (Yes, this is\n# fragile, but it works...)\n\npip_init = os.path.join(docs_dir, '..', 'src', 'pip', '__init__.py')\nwith open(pip_init) as f:\n    for line in f:\n        m = re.match(r'__version__ = \"(.*)\"', line)\n        if m:\n            __version__ = m.group(1)\n            # The short X.Y version.\n            version = '.'.join(__version__.split('.')[:2])\n            # The full version, including alpha/beta/rc tags.\n            release = __version__\n            break\n\n# We have this here because readthedocs plays tricks sometimes and there seems\n# to be a heisenbug, related to the version of pip discovered. This is here to\n# help debug that if someone decides to do that in the future.\nprint(version)\n\n# The language for content autogenerated by Sphinx. Refer to documentation\n# for a list of supported languages.\n# language = None\n\n# There are two options for replacing |today|: either, you set today to some\n# non-false value, then it is used:\n# today = ''\n# Else, today_fmt is used as the format for a strftime call.\ntoday_fmt = '%B %d, %Y'\n\n# List of documents that shouldn't be included in the build.\n# unused_docs = []\n\n# List of directories, relative to source directory, that shouldn't be searched\n# for source files.\nexclude_patterns = ['build/']\n\n# The reST default role (used for this markup: `text`) to use for all documents\n# default_role = None\n\n# If true, '()' will be appended to :func: etc. cross-reference text.\n# add_function_parentheses = True\n\n# If true, the current module name will be prepended to all description\n# unit titles (such as .. function::).\n# add_module_names = True\n\n# If true, sectionauthor and moduleauthor directives will be shown in the\n# output. They are ignored by default.\n# show_authors = False\n\n# The name of the Pygments (syntax highlighting) style to use.\npygments_style = 'sphinx'\n\n# A list of ignored prefixes for module index sorting.\n# modindex_common_prefix = []\n\nextlinks = {\n    'issue': ('https://github.com/pypa/pip/issues/%s', '#'),\n    'pull': ('https://github.com/pypa/pip/pull/%s', 'PR #'),\n    'pypi': ('https://pypi.org/project/%s', ''),\n}\n\n# -- Options for HTML output --------------------------------------------------\n\n# The theme to use for HTML and HTML Help pages.  Major themes that come with\n# Sphinx are currently 'default' and 'sphinxdoc'.\nhtml_theme = \"pypa_theme\"\n\n# Theme options are theme-specific and customize the look and feel of a theme\n# further.  For a list of options available for each theme, see the\n# documentation.\nhtml_theme_options = {\n    'collapsiblesidebar': True,\n    'externalrefs': True,\n    'navigation_depth': 3,\n    'issues_url': 'https://github.com/pypa/pip/issues'\n}\n\n# Add any paths that contain custom themes here, relative to this directory.\n\n# The name for this set of Sphinx documents.  If None, it defaults to\n# \"<project> v<release> documentation\".\n# html_title = None\n\n# A shorter title for the navigation bar.  Default is the same as html_title.\n# html_short_title = None\n\n# The name of an image file (relative to this directory) to place at the top\n# of the sidebar.\n# html_logo = '_static/piplogo.png'\n\n# The name of an image file (within the static path) to use as favicon of the\n# docs.  This file should be a Windows icon file (.ico) being 16x16 or 32x32\n# pixels large.\n# html_favicon = 'favicon.png'\n\n# Add any paths that contain custom static files (such as style sheets) here,\n# relative to this directory. They are copied after the builtin static files,\n# so a file named \"default.css\" will overwrite the builtin \"default.css\".\nhtml_static_path = []\n\n# If not '', a 'Last updated on:' timestamp is inserted at every page bottom,\n# using the given strftime format.\nhtml_last_updated_fmt = '%b %d, %Y'\n\n# If true, the Docutils Smart Quotes transform (originally based on\n# SmartyPants) will be used to convert characters like quotes and dashes\n# to typographically correct entities.  The default is True.\nsmartquotes = True\n\n# This string, for use with Docutils 0.14 or later, customizes the\n# SmartQuotes transform. The default of \"qDe\" converts normal quote\n# characters ('\"' and \"'\"), en and em dashes (\"--\" and \"---\"), and\n# ellipses \"...\".\n#    For now, we disable the conversion of dashes so that long options\n# like \"--find-links\" won't render as \"-find-links\" if included in the\n# text in places where monospaced type can't be used. For example, backticks\n# can't be used inside roles like :ref:`--no-index <--no-index>` because\n# of nesting.\nsmartquotes_action = \"qe\"\n\n# Custom sidebar templates, maps document names to template names.\nhtml_sidebars = {\n    '**': ['localtoc.html', 'relations.html'],\n    'index': ['localtoc.html']\n}\n\n# Additional templates that should be rendered to pages, maps page names to\n# template names.\n# html_additional_pages = {}\n\n# If false, no module index is generated.\nhtml_use_modindex = False\n\n# If false, no index is generated.\nhtml_use_index = False\n\n# If true, the index is split into individual pages for each letter.\n# html_split_index = False\n\n# If true, links to the reST sources are added to the pages.\nhtml_show_sourcelink = False\n\n# If true, an OpenSearch description file will be output, and all pages will\n# contain a <link> tag referring to it.  The value of this option must be the\n# base URL from which the finished HTML is served.\n# html_use_opensearch = ''\n\n# If nonempty, this is the file name suffix for HTML files (e.g. \".xhtml\").\n# html_file_suffix = ''\n\n# Output file base name for HTML help builder.\nhtmlhelp_basename = 'pipdocs'\n\n\n# -- Options for LaTeX output -------------------------------------------------\n\n# The paper size ('letter' or 'a4').\n# latex_paper_size = 'letter'\n\n# The font size ('10pt', '11pt' or '12pt').\n# latex_font_size = '10pt'\n\n# Grouping the document tree into LaTeX files. List of tuples\n# (source start file, target name, title, author, documentclass [howto/manual])\nlatex_documents = [\n    (\n        'index',\n        'pip.tex',\n        u'pip Documentation',\n        u'pip developers',\n        'manual',\n    ),\n]\n\n# The name of an image file (relative to this directory) to place at the top of\n# the title page.\n# latex_logo = None\n\n# For \"manual\" documents, if this is true, then toplevel headings are parts,\n# not chapters.\n# latex_use_parts = False\n\n# Additional stuff for the LaTeX preamble.\n# latex_preamble = ''\n\n# Documents to append as an appendix to all manuals.\n# latex_appendices = []\n\n# If false, no module index is generated.\n# latex_use_modindex = True\n\n# -- Options for Manual Pages -------------------------------------------------\n\n# List of manual pages generated\nman_pages = [\n    (\n        'index',\n        'pip',\n        u'package manager for Python packages',\n        u'pip developers',\n        1\n    )\n]\n\n# Here, we crawl the entire man/commands/ directory and list every file with\n# appropriate name and details\nfor fname in glob.glob('man/commands/*.rst'):\n    fname_base = fname[4:-4]\n    outname = 'pip-' + fname_base[13:]\n    description = u'description of {} command'.format(\n        outname.replace('-', ' ')\n    )\n\n    man_pages.append((fname_base, outname, description, u'pip developers', 1))\n", "path": "docs/html/conf.py"}], "after_files": [{"content": "# -*- coding: utf-8 -*-\n#\n# pip documentation build configuration file, created by\n# sphinx-quickstart on Tue Apr 22 22:08:49 2008\n#\n# This file is execfile()d with the current directory set to its containing dir\n#\n# Note that not all possible configuration values are present in this\n# autogenerated file.\n#\n# All configuration values have a default; values that are commented out\n# serve to show the default.\n\nimport glob\nimport os\nimport re\nimport sys\n\non_rtd = os.environ.get('READTHEDOCS', None) == 'True'\n\ndocs_dir = os.path.dirname(os.path.dirname(__file__))\n# If extensions (or modules to document with autodoc) are in another directory,\n# add these directories to sys.path here. If the directory is relative to the\n# documentation root, use os.path.abspath to make it absolute, like shown here.\nsys.path.insert(0, docs_dir)\n# sys.path.append(os.path.join(os.path.dirname(__file__), '../'))\n\n# -- General configuration ----------------------------------------------------\n\n# Add any Sphinx extension module names here, as strings. They can be\n# extensions coming with Sphinx (named 'sphinx.ext.*') or your custom ones.\n# extensions = ['sphinx.ext.autodoc']\nextensions = ['sphinx.ext.extlinks', 'pip_sphinxext', 'sphinx.ext.intersphinx']\n\n# intersphinx\nintersphinx_cache_limit = 0\nintersphinx_mapping = {\n    'pypug': ('https://packaging.python.org/', None),\n    'pypa': ('https://www.pypa.io/en/latest/', None),\n}\n\n\n# Add any paths that contain templates here, relative to this directory.\ntemplates_path = []\n\n# The suffix of source filenames.\nsource_suffix = '.rst'\n\n# The encoding of source files.\n# source_encoding = 'utf-8'\n\n# The master toctree document.\nmaster_doc = 'index'\n\n# General information about the project.\nproject = 'pip'\ncopyright = '2008-2017, PyPA'\n\n# The version info for the project you're documenting, acts as replacement for\n# |version| and |release|, also used in various other places throughout the\n# built documents.\n#\n# The short X.Y version.\n\nversion = release = 'dev'\n\n# Readthedocs seems to install pip as an egg (via setup.py install) which\n# is somehow resulting in \"import pip\" picking up an older copy of pip.\n# Rather than trying to force RTD to install pip properly, we'll simply\n# read the version direct from the __init__.py file. (Yes, this is\n# fragile, but it works...)\n\npip_init = os.path.join(docs_dir, '..', 'src', 'pip', '__init__.py')\nwith open(pip_init) as f:\n    for line in f:\n        m = re.match(r'__version__ = \"(.*)\"', line)\n        if m:\n            __version__ = m.group(1)\n            # The short X.Y version.\n            version = '.'.join(__version__.split('.')[:2])\n            # The full version, including alpha/beta/rc tags.\n            release = __version__\n            break\n\n# We have this here because readthedocs plays tricks sometimes and there seems\n# to be a heisenbug, related to the version of pip discovered. This is here to\n# help debug that if someone decides to do that in the future.\nprint(version)\n\n# The language for content autogenerated by Sphinx. Refer to documentation\n# for a list of supported languages.\n# language = None\n\n# There are two options for replacing |today|: either, you set today to some\n# non-false value, then it is used:\n# today = ''\n# Else, today_fmt is used as the format for a strftime call.\ntoday_fmt = '%B %d, %Y'\n\n# List of documents that shouldn't be included in the build.\n# unused_docs = []\n\n# List of directories, relative to source directory, that shouldn't be searched\n# for source files.\nexclude_patterns = ['build/']\n\n# The reST default role (used for this markup: `text`) to use for all documents\n# default_role = None\n\n# If true, '()' will be appended to :func: etc. cross-reference text.\n# add_function_parentheses = True\n\n# If true, the current module name will be prepended to all description\n# unit titles (such as .. function::).\n# add_module_names = True\n\n# If true, sectionauthor and moduleauthor directives will be shown in the\n# output. They are ignored by default.\n# show_authors = False\n\n# The name of the Pygments (syntax highlighting) style to use.\npygments_style = 'sphinx'\n\n# A list of ignored prefixes for module index sorting.\n# modindex_common_prefix = []\n\nextlinks = {\n    'issue': ('https://github.com/pypa/pip/issues/%s', '#'),\n    'pull': ('https://github.com/pypa/pip/pull/%s', 'PR #'),\n    'pypi': ('https://pypi.org/project/%s', ''),\n}\n\n# -- Options for HTML output --------------------------------------------------\n\n# The theme to use for HTML and HTML Help pages.  Major themes that come with\n# Sphinx are currently 'default' and 'sphinxdoc'.\nhtml_theme = \"pypa_theme\"\n\n# Theme options are theme-specific and customize the look and feel of a theme\n# further.  For a list of options available for each theme, see the\n# documentation.\nhtml_theme_options = {\n    'collapsiblesidebar': True,\n    'externalrefs': True,\n    'navigation_depth': 3,\n    'issues_url': 'https://github.com/pypa/pip/issues'\n}\n\n# Add any paths that contain custom themes here, relative to this directory.\n\n# The name for this set of Sphinx documents.  If None, it defaults to\n# \"<project> v<release> documentation\".\n# html_title = None\n\n# A shorter title for the navigation bar.  Default is the same as html_title.\n# html_short_title = None\n\n# The name of an image file (relative to this directory) to place at the top\n# of the sidebar.\n# html_logo = '_static/piplogo.png'\n\n# The name of an image file (within the static path) to use as favicon of the\n# docs.  This file should be a Windows icon file (.ico) being 16x16 or 32x32\n# pixels large.\n# html_favicon = 'favicon.png'\n\n# Add any paths that contain custom static files (such as style sheets) here,\n# relative to this directory. They are copied after the builtin static files,\n# so a file named \"default.css\" will overwrite the builtin \"default.css\".\nhtml_static_path = []\n\n# If not '', a 'Last updated on:' timestamp is inserted at every page bottom,\n# using the given strftime format.\nhtml_last_updated_fmt = '%b %d, %Y'\n\n# If true, the Docutils Smart Quotes transform (originally based on\n# SmartyPants) will be used to convert characters like quotes and dashes\n# to typographically correct entities.  The default is True.\nsmartquotes = True\n\n# This string, for use with Docutils 0.14 or later, customizes the\n# SmartQuotes transform. The default of \"qDe\" converts normal quote\n# characters ('\"' and \"'\"), en and em dashes (\"--\" and \"---\"), and\n# ellipses \"...\".\n#    For now, we disable the conversion of dashes so that long options\n# like \"--find-links\" won't render as \"-find-links\" if included in the\n# text in places where monospaced type can't be used. For example, backticks\n# can't be used inside roles like :ref:`--no-index <--no-index>` because\n# of nesting.\nsmartquotes_action = \"qe\"\n\n# Custom sidebar templates, maps document names to template names.\nhtml_sidebars = {\n    '**': ['localtoc.html', 'relations.html'],\n    'index': ['localtoc.html']\n}\n\n# Additional templates that should be rendered to pages, maps page names to\n# template names.\n# html_additional_pages = {}\n\n# If false, no module index is generated.\nhtml_use_modindex = False\n\n# If false, no index is generated.\nhtml_use_index = False\n\n# If true, the index is split into individual pages for each letter.\n# html_split_index = False\n\n# If true, links to the reST sources are added to the pages.\nhtml_show_sourcelink = False\n\n# If true, an OpenSearch description file will be output, and all pages will\n# contain a <link> tag referring to it.  The value of this option must be the\n# base URL from which the finished HTML is served.\n# html_use_opensearch = ''\n\n# If nonempty, this is the file name suffix for HTML files (e.g. \".xhtml\").\n# html_file_suffix = ''\n\n# Output file base name for HTML help builder.\nhtmlhelp_basename = 'pipdocs'\n\n\n# -- Options for LaTeX output -------------------------------------------------\n\n# The paper size ('letter' or 'a4').\n# latex_paper_size = 'letter'\n\n# The font size ('10pt', '11pt' or '12pt').\n# latex_font_size = '10pt'\n\n# Grouping the document tree into LaTeX files. List of tuples\n# (source start file, target name, title, author, documentclass [howto/manual])\nlatex_documents = [\n    (\n        'index',\n        'pip.tex',\n        u'pip Documentation',\n        u'pip developers',\n        'manual',\n    ),\n]\n\n# The name of an image file (relative to this directory) to place at the top of\n# the title page.\n# latex_logo = None\n\n# For \"manual\" documents, if this is true, then toplevel headings are parts,\n# not chapters.\n# latex_use_parts = False\n\n# Additional stuff for the LaTeX preamble.\n# latex_preamble = ''\n\n# Documents to append as an appendix to all manuals.\n# latex_appendices = []\n\n# If false, no module index is generated.\n# latex_use_modindex = True\n\n# -- Options for Manual Pages -------------------------------------------------\n\n# List of manual pages generated\nman_pages = [\n    (\n        'index',\n        'pip',\n        u'package manager for Python packages',\n        u'pip developers',\n        1\n    )\n]\n\n# Here, we crawl the entire man/commands/ directory and list every file with\n# appropriate name and details\nman_dir = os.path.join(docs_dir, 'man/')\nraw_subcommands = glob.glob(os.path.join(man_dir, 'commands/*.rst'))\nif not raw_subcommands:\n    raise FileNotFoundError('The individual subcommand manpages could not be found!')\nfor fname in raw_subcommands:\n    fname_base = fname[len(man_dir):-4]\n    outname = 'pip-' + fname_base[9:]\n    description = u'description of {} command'.format(\n        outname.replace('-', ' ')\n    )\n\n    man_pages.append((fname_base, outname, description, u'pip developers', 1))\n", "path": "docs/html/conf.py"}]}