diff --git a/docs/source/conf.py b/docs/source/conf.py index 5e101e9e..3afb88bb 100644 --- a/docs/source/conf.py +++ b/docs/source/conf.py @@ -14,7 +14,10 @@ import sys import os -autodoc_mock_imports = ["esgf"] +# esgf is not currently available for Python 3 and will throw an +# error when building the documents. +if sys.version_info[0] >= 3: + autodoc_mock_imports = ["esgf"] # 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