We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 8a51c0a commit fb070f9Copy full SHA for fb070f9
numpydoc/__init__.py
@@ -6,7 +6,16 @@
6
from ._version import __version__
7
8
9
-def setup(app, *args, **kwargs):
10
- from .numpydoc import setup
+# NOTE: Determine whether sphinx is installed with an explicit import.
+# If so, define the setup function for registering the numpydoc extension;
11
+# otherwise skip this step.
12
+try:
13
+ import sphinx
14
- return setup(app, *args, **kwargs)
15
+
16
+ def setup(app, *args, **kwargs):
17
+ from .numpydoc import setup
18
19
+ return setup(app, *args, **kwargs)
20
+except ModuleNotFoundError:
21
+ pass
0 commit comments