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 e1750a8 commit d12be50Copy full SHA for d12be50
doc/conf.py
@@ -11,6 +11,7 @@
11
12
import os
13
import shutil
14
+import subprocess
15
import sys
16
17
import matplotlib
@@ -142,8 +143,13 @@ def _check_deps():
142
143
master_doc = 'contents'
144
145
# General substitutions.
-from subprocess import check_output
146
-SHA = check_output(['git', 'describe', '--dirty']).decode('utf-8').strip()
+try:
147
+ SHA = subprocess.check_output(
148
+ ['git', 'describe', '--dirty']).decode('utf-8').strip()
149
+# Catch the case where git is not installed locally, and use the versioneer
150
+# version number instead
151
+except (subprocess.CalledProcessError, FileNotFoundError):
152
+ SHA = matplotlib.__version__
153
154
html_context = {'sha': SHA}
155
0 commit comments