trafficserver-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From jpe...@apache.org
Subject [47/51] trafficserver git commit: doc: handle an absent python-sphinx_rtd_theme package
Date Tue, 03 Nov 2015 06:10:23 GMT
doc: handle an absent python-sphinx_rtd_theme package


Project: http://git-wip-us.apache.org/repos/asf/trafficserver/repo
Commit: http://git-wip-us.apache.org/repos/asf/trafficserver/commit/a29cdab0
Tree: http://git-wip-us.apache.org/repos/asf/trafficserver/tree/a29cdab0
Diff: http://git-wip-us.apache.org/repos/asf/trafficserver/diff/a29cdab0

Branch: refs/heads/master
Commit: a29cdab05b47bbfa5c986400b42b693d5116fc6f
Parents: 1f0d3b7
Author: James Peach <jpeach@apache.org>
Authored: Mon Nov 2 21:44:31 2015 -0800
Committer: James Peach <jpeach@apache.org>
Committed: Mon Nov 2 22:09:16 2015 -0800

----------------------------------------------------------------------
 doc/conf.py | 11 ++++++++---
 1 file changed, 8 insertions(+), 3 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/trafficserver/blob/a29cdab0/doc/conf.py
----------------------------------------------------------------------
diff --git a/doc/conf.py b/doc/conf.py
index 500a0dd..0574fad 100644
--- a/doc/conf.py
+++ b/doc/conf.py
@@ -113,9 +113,14 @@ if os.environ.get('READTHEDOCS') == 'True':
           po.save_as_mofile(fpath=mo_file)
   print "done"
 else:
-  import sphinx_rtd_theme
-  html_theme = 'sphinx_rtd_theme'
-  html_theme_path = [sphinx_rtd_theme.get_html_theme_path()]
+  # On RedHat-based distributions, install the python-sphinx_rtd_theme package
+  # to get an end result tht looks more like readthedoc.org.
+  try:
+    import sphinx_rtd_theme
+    html_theme = 'sphinx_rtd_theme'
+    html_theme_path = [sphinx_rtd_theme.get_html_theme_path()]
+  except:
+    pass
 ## End of HACK
 
 # There are two options for replacing |today|: either, you set today to some


Mime
View raw message