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