summaryrefslogtreecommitdiff
path: root/numpy
diff options
context:
space:
mode:
authorCharles Harris <charlesr.harris@gmail.com>2013-05-20 16:05:29 -0700
committerCharles Harris <charlesr.harris@gmail.com>2013-05-20 16:05:29 -0700
commit074d3037cf4cb23e8ee825fc06ea1209daf53d1a (patch)
tree2248615ad8051015894907160be5cdacc9bf98ea /numpy
parentde166d31c083bbb2c288ada15900f98a4245d596 (diff)
parenteec5e489778764bb80bcb900ae88e8abc7db1ff3 (diff)
downloadnumpy-074d3037cf4cb23e8ee825fc06ea1209daf53d1a.tar.gz
Merge pull request #3342 from rgommers/easyinstall-issue
BLD: fix setuptools-specific easy_install issue. Closes gh-3160.
Diffstat (limited to 'numpy')
-rw-r--r--numpy/distutils/system_info.py6
1 files changed, 4 insertions, 2 deletions
diff --git a/numpy/distutils/system_info.py b/numpy/distutils/system_info.py
index 125a1f175..13f52801e 100644
--- a/numpy/distutils/system_info.py
+++ b/numpy/distutils/system_info.py
@@ -223,8 +223,10 @@ else:
tmp = open(os.devnull, 'w')
p = sp.Popen(["gcc", "-print-multiarch"], stdout=sp.PIPE,
stderr=tmp)
- except OSError:
- pass # gcc is not installed
+ except (OSError, DistutilsError):
+ # OSError if gcc is not installed, or SandboxViolation (DistutilsError
+ # subclass) if an old setuptools bug is triggered (see gh-3160).
+ pass
else:
triplet = str(p.communicate()[0].decode().strip())
if p.returncode == 0: