summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
Diffstat (limited to 'lib')
-rw-r--r--lib/spack/docs/conf.py8
1 files changed, 7 insertions, 1 deletions
diff --git a/lib/spack/docs/conf.py b/lib/spack/docs/conf.py
index e051b6e405..97b46970bd 100644
--- a/lib/spack/docs/conf.py
+++ b/lib/spack/docs/conf.py
@@ -42,7 +42,13 @@ import re
import shutil
import subprocess
from glob import glob
-from sphinx.apidoc import main as sphinx_apidoc
+
+# Since Sphinx 1.7, sphinx.apidoc has been moved to sphinx.ext.apidoc
+# sphinx.apidoc is deprecated and will be removed in Sphinx 2.0
+try:
+ from sphinx.ext.apidoc import main as sphinx_apidoc
+except ImportError:
+ from sphinx.apidoc import main as sphinx_apidoc
# -- Spack customizations -----------------------------------------------------