summaryrefslogtreecommitdiff
path: root/numpy/distutils
diff options
context:
space:
mode:
Diffstat (limited to 'numpy/distutils')
-rw-r--r--numpy/distutils/ccompiler.py3
-rw-r--r--numpy/distutils/fcompiler/__init__.py3
2 files changed, 2 insertions, 4 deletions
diff --git a/numpy/distutils/ccompiler.py b/numpy/distutils/ccompiler.py
index 86201174d..f0487cb64 100644
--- a/numpy/distutils/ccompiler.py
+++ b/numpy/distutils/ccompiler.py
@@ -338,8 +338,7 @@ def CCompiler_compile(self, sources, output_dir=None, macros=None,
if self.compiler_type=='absoft':
obj = cyg2win32(obj)
src = cyg2win32(src)
- if Path(src).suffix.lower() in COMMON_FIXED_EXTENSIONS \
- and not has_f90_header(src):
+ if is_f_file(src) and not has_f90_header(src):
f77_objects.append((obj, (src, ext)))
else:
other_objects.append((obj, (src, ext)))
diff --git a/numpy/distutils/fcompiler/__init__.py b/numpy/distutils/fcompiler/__init__.py
index 793f0bccf..ecba3e5d5 100644
--- a/numpy/distutils/fcompiler/__init__.py
+++ b/numpy/distutils/fcompiler/__init__.py
@@ -571,8 +571,7 @@ class FCompiler(CCompiler):
def _compile(self, obj, src, ext, cc_args, extra_postargs, pp_opts):
"""Compile 'src' to product 'obj'."""
src_flags = {}
- if Path(src).suffix.lower() in COMMON_FIXED_EXTENSIONS \
- and not has_f90_header(src):
+ if is_f_file(src) and not has_f90_header(src):
flavor = ':f77'
compiler = self.compiler_f77
src_flags = get_f77flags(src)