Allow docs to be built with Sphinx 1.7.1+ (#8500)
* Allow docs to be built with Sphinx 1.7.1+ * Allow docs to be built with Sphinx 2.0+
This commit is contained in:
parent
3e2636e10f
commit
55d0d1814c
@ -42,7 +42,13 @@
|
||||
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 -----------------------------------------------------
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user