docs: remove legacy import for Sphinx 1.7

This commit is contained in:
Todd Gamblin 2019-05-21 23:36:41 -07:00
parent e1c5d1378b
commit 8bf1bd4637

View file

@ -24,12 +24,7 @@
import subprocess
from glob import glob
# 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
from sphinx.ext.apidoc import main as sphinx_apidoc
# -- Spack customizations -----------------------------------------------------