napoleon/ReadTheDocs sphinx version fix

This commit is contained in:
Mahmoud Hashemi 2015-03-31 00:45:28 -07:00
parent 17f09bd85f
commit 57560c7abb
1 changed files with 7 additions and 3 deletions

View File

@ -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']