diff options
| author | Sebastian Berg <sebastian@sipsolutions.net> | 2020-06-04 13:57:33 -0500 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2020-06-04 13:57:33 -0500 |
| commit | abce2a0604a4db5d8072a0b1478c7af439882ed7 (patch) | |
| tree | 24ab8c870113e7fa214529c45d992a7458d42297 | |
| parent | 821a18e55916d0d40227c58ea75f589ea3d9f078 (diff) | |
| parent | 6deecb9e5a13a51f2e27a7af34aa1868f0330f6a (diff) | |
| download | numpy-abce2a0604a4db5d8072a0b1478c7af439882ed7.tar.gz | |
Merge pull request #16468 from scivision/gcc10
BUG: fix GCC 10 major version comparison
| -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 796dff351..23d905393 100644 --- a/numpy/distutils/fcompiler/gnu.py +++ b/numpy/distutils/fcompiler/gnu.py @@ -10,6 +10,7 @@ import subprocess from subprocess import Popen, PIPE, STDOUT from numpy.distutils.exec_command import filepath_from_subprocess_output from numpy.distutils.fcompiler import FCompiler +from distutils.version import LooseVersion compilers = ['GnuFCompiler', 'Gnu95FCompiler'] @@ -273,7 +274,7 @@ class Gnu95FCompiler(GnuFCompiler): if not v or v[0] != 'gfortran': return None v = v[1] - if v >= '4.': + if LooseVersion(v) >= "4": # gcc-4 series releases do not support -mno-cygwin option pass else: |
