Merge "Update to latest Sphinx for documentation"

This commit is contained in:
Jenkins 2017-04-14 09:25:29 +00:00 committed by Gerrit Code Review
commit c9e66d7de8
2 changed files with 12 additions and 11 deletions

View File

@ -73,16 +73,17 @@ def transform_github_links(app, doctree, fromdocname):
# Replace the suffix with the correct target format file ending,
# but only if the link ends with both the correct source suffix
# and refers to a local file.
if link.endswith(source_suffix):
# absolute paths are considered relative to repo
if link.startswith("/"):
basepath = ""
# relative paths are against the current doctree source path
else:
basepath = doc_dir
if os.path.exists(os.path.join(basepath, link)):
node['refuri'] = (link[:-len(source_suffix)] + target_format +
anchor)
for src_suffix in source_suffix:
if link.endswith(src_suffix):
# absolute paths are considered relative to repo
if link.startswith("/"):
basepath = ""
# relative paths are against the current doctree source path
else:
basepath = doc_dir
if os.path.exists(os.path.join(basepath, link)):
node['refuri'] = (link[:-len(source_suffix)] + target_format +
anchor)
def setup(app):

View File

@ -1,7 +1,7 @@
hacking>=0.11.0,<0.12 # Apache-2.0
loremipsum
mock!=1.1.1,<=1.3.0
Sphinx>=1.1.2,<1.2
sphinx>=1.5.1 # BSD
discover
coverage>=3.6 # Apache-2.0
fixtures>=0.3.14