diff options
author | Charles Harris <charlesr.harris@gmail.com> | 2021-03-31 08:20:14 -0600 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-03-31 08:20:14 -0600 |
commit | 2c9130e848c3ecc489ac1bba1d759b1ebc5d5c65 (patch) | |
tree | c57d023fb2ae93155e94a4a40afaa78b5700ff66 | |
parent | 6113ec785251c4f320cac73ed80e5c135bda295a (diff) | |
parent | 2cf38000274a94c1b118f1a38e2a6e2c7401eb16 (diff) | |
download | numpy-2c9130e848c3ecc489ac1bba1d759b1ebc5d5c65.tar.gz |
Merge pull request #18701 from kchoudhu/main
BLD: 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 |