summaryrefslogtreecommitdiff
path: root/setup.py
diff options
context:
space:
mode:
authormattip <matti.picus@gmail.com>2019-04-25 05:51:55 -0700
committermattip <matti.picus@gmail.com>2019-04-25 05:51:55 -0700
commit6424fee347f699db92d35da5f7d4698946ceeb7c (patch)
tree2c8b68d02f527d099a30a4e941ea40f7509f23eb /setup.py
parent5d43b09b05f6f4e3279a17b6fe91487d011df6e1 (diff)
downloadnumpy-6424fee347f699db92d35da5f7d4698946ceeb7c.tar.gz
BUILD, BUG: fix from review, fix bug in git_version
Diffstat (limited to 'setup.py')
-rwxr-xr-xsetup.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/setup.py b/setup.py
index 6c0577006..cd919bb23 100755
--- a/setup.py
+++ b/setup.py
@@ -73,13 +73,13 @@ def git_version():
env['LANGUAGE'] = 'C'
env['LANG'] = 'C'
env['LC_ALL'] = 'C'
- out = subprocess.Popen(cmd, stdout=subprocess.PIPE, env=env).communicate()[0]
+ out = subprocess.check_output(cmd, stderr=subprocess.STDOUT, env=env)
return out
try:
out = _minimal_ext_cmd(['git', 'rev-parse', 'HEAD'])
GIT_REVISION = out.strip().decode('ascii')
- except OSError:
+ except subprocess.SubprocessError:
GIT_REVISION = "Unknown"
return GIT_REVISION