diff --git a/docs/conf.py b/docs/conf.py index e549827..afdfa64 100644 --- a/docs/conf.py +++ b/docs/conf.py @@ -12,8 +12,9 @@ # All configuration values have a default; values that are commented out # serve to show the default. -import sys import os +import sys +import sphinx # 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 @@ -35,10 +36,13 @@ extensions = [ 'sphinx.ext.intersphinx', 'sphinx.ext.coverage', 'sphinx.ext.viewcode', - 'sphinx.ext.napoleon', ] -needs_sphinx = '1.3' +# Read the Docs is version 1.2 as of writing +if sphinx.version_info[:2] < (1, 3): + extensions.append('sphinxcontrib.napoleon') +else: + extensions.append('sphinx.ext.napoleon') # Add any paths that contain templates here, relative to this directory. templates_path = ['_templates']