diff options
author | Kamil Choudhury <kamil.choudhury@anserinae.net> | 2021-03-30 17:22:42 +0000 |
---|---|---|
committer | Kamil Choudhury <kamil.choudhury@anserinae.net> | 2021-03-30 17:31:46 +0000 |
commit | 2cf38000274a94c1b118f1a38e2a6e2c7401eb16 (patch) | |
tree | c3e5c2b0fadaf9adc422d1e7c0caa85f3f2474bd | |
parent | d1b1f5f159fe075d3193946e81ff5d8656cf4e26 (diff) | |
download | numpy-2cf38000274a94c1b118f1a38e2a6e2c7401eb16.tar.gz |
Strip extra newline when dumping gfortran version on MacOS
-rw-r--r-- | numpy/distutils/fcompiler/gnu.py | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/numpy/distutils/fcompiler/gnu.py b/numpy/distutils/fcompiler/gnu.py index 68d1501ee..eac4cbb47 100644 --- a/numpy/distutils/fcompiler/gnu.py +++ b/numpy/distutils/fcompiler/gnu.py @@ -32,7 +32,8 @@ class GnuFCompiler(FCompiler): """Handle the different versions of GNU fortran compilers""" # Strip warning(s) that may be emitted by gfortran while version_string.startswith('gfortran: warning'): - version_string = version_string[version_string.find('\n') + 1:] + version_string =\ + version_string[version_string.find('\n') + 1:].strip() # Gfortran versions from after 2010 will output a simple string # (usually "x.y", "x.y.z" or "x.y.z-q") for ``-dumpversion``; older |