From e5f88be966836677f6a78bbeac48ab7ca614e01e Mon Sep 17 00:00:00 2001 From: Chris Ward Date: Mon, 27 Apr 2015 18:17:34 +0200 Subject: [PATCH] 1.3.1 readthedocs sphinx compat fix --- docs/conf.py | 14 +++++++++++--- 1 file changed, 11 insertions(+), 3 deletions(-) diff --git a/docs/conf.py b/docs/conf.py index 0cd9f303..1a987658 100644 --- a/docs/conf.py +++ b/docs/conf.py @@ -12,9 +12,9 @@ # All configuration values have a default; values that are commented out # serve to show the default. -#import sys -#import os -#import shlex +import sys +import os +import shlex # If extensions (or modules to document with autodoc) are in another directory, # add these directories to sys.path here. If the directory is relative to the @@ -112,6 +112,14 @@ # a list of builtin themes. html_theme = 'alabaster' +# 1.3.1 sphinx READTHEDOCS build compat +# SEE: +# https://github.com/shabda/pysaml2/commit/d55bfeebe +on_rtd = os.environ.get('READTHEDOCS', None) == 'True' + +if on_rtd: # only import and set the theme if we're building docs locally + html_theme = 'sphinx_rtd_theme' + # Theme options are theme-specific and customize the look and feel of a theme # further. For a list of options available for each theme, see the # documentation.