summaryrefslogtreecommitdiff
path: root/setup.py
diff options
context:
space:
mode:
authorSeth Troisi <sethtroisi@google.com>2019-09-23 12:30:44 -0700
committerRalf Gommers <ralf.gommers@gmail.com>2019-09-23 21:30:44 +0200
commit0498afea94525ea157e52b8edc255f13ed7d4004 (patch)
tree5dcebeb4eb56da3dff67184b992921fb407fd429 /setup.py
parenta98f7c6f6decff7133ffc9b2e7b44d88020769f8 (diff)
downloadnumpy-0498afea94525ea157e52b8edc255f13ed7d4004.tar.gz
MAINT: Add assert that git version is available. (#14548)
MAINT: handle case where GIT_VERSION is empty string
Diffstat (limited to 'setup.py')
-rwxr-xr-xsetup.py4
1 files changed, 4 insertions, 0 deletions
diff --git a/setup.py b/setup.py
index 26ccbf933..068f0f405 100755
--- a/setup.py
+++ b/setup.py
@@ -83,6 +83,10 @@ def git_version():
except (subprocess.SubprocessError, OSError):
GIT_REVISION = "Unknown"
+ if not GIT_REVISION:
+ # this shouldn't happen but apparently can (see gh-8512)
+ GIT_REVISION = "Unknown"
+
return GIT_REVISION
# BEFORE importing setuptools, remove MANIFEST. Otherwise it may not be