diff options
author | Ralf Gommers <ralf.gommers@googlemail.com> | 2013-05-19 22:15:09 +0200 |
---|---|---|
committer | Ralf Gommers <ralf.gommers@googlemail.com> | 2013-05-19 22:16:44 +0200 |
commit | eec5e489778764bb80bcb900ae88e8abc7db1ff3 (patch) | |
tree | f04912b0a885c6ffbe3c3e2cd50de00e41aad8fa | |
parent | 7d188bf1c9ac5bf7ee41e0794d59771802b345bf (diff) | |
download | numpy-eec5e489778764bb80bcb900ae88e8abc7db1ff3.tar.gz |
BLD: fix setuptools-specific easy_install issue. Closes gh-3160.
An error is raised by setuptools when trying to write to /dev/null. Was fixed
in distribute, but not in setuptools.
No multi-arch support with plain setuptools should be OK, because multi-arch is
Ubuntu specific (at least for now), and they ship distribute.
-rw-r--r-- | numpy/distutils/system_info.py | 6 |
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: |