diff options
author | mattip <matti.picus@gmail.com> | 2020-06-17 15:37:02 +0300 |
---|---|---|
committer | mattip <matti.picus@gmail.com> | 2020-06-17 15:55:30 +0300 |
commit | 4142eba57b0bde071cb6d0718c88c6ddf7a6e906 (patch) | |
tree | 3b3bb8f0bd05f1fb856c12d6cef08ca3e9cf822c /setup.py | |
parent | eab6af0ae7773bf4dc1ee2653a59da2c274b8ff3 (diff) | |
download | numpy-4142eba57b0bde071cb6d0718c88c6ddf7a6e906.tar.gz |
BUG: fixes failures (from review)
Diffstat (limited to 'setup.py')
-rwxr-xr-x | setup.py | 7 |
1 files changed, 4 insertions, 3 deletions
@@ -238,13 +238,14 @@ def get_build_overrides(): is_old_gcc = False if obj.compiler.compiler_type == 'unix': cc = obj.compiler.compiler[0] - if cc == "gcc": + if "gcc" in cc: out = subprocess.run([cc, '-dumpversion'], stdout=subprocess.PIPE, stderr=subprocess.PIPE, ) - ver = float(out.stdout) - if ver < 6: + # will print something like b'4.2.1\n' + ver_parts = out.stdout.split(b'.') + if int(ver_parts[0]) < 6: # perhaps 5 is OK? is_old_gcc = True return is_old_gcc |