summaryrefslogtreecommitdiff
path: root/numpy/distutils/fcompiler
diff options
context:
space:
mode:
authorRalf Gommers <ralf.gommers@gmail.com>2023-01-22 23:26:22 +0100
committerGitHub <noreply@github.com>2023-01-22 23:26:22 +0100
commita68f24b441012e9740adabee450a7e98bb72625d (patch)
treebf9f5bbc6d49702e0176e9a3b362e31dbf714c66 /numpy/distutils/fcompiler
parent3d21a27db036f408ea4d21ac011ac082b49b4aeb (diff)
downloadnumpy-revert-22885-cleanCrackfortran.tar.gz
Revert "MAINT: `f2py` cleanup (#22885)"revert-22885-cleanCrackfortran
This reverts commit 6b5cd92675139511b4b24ddfe822e96b03700edb.
Diffstat (limited to 'numpy/distutils/fcompiler')
-rw-r--r--numpy/distutils/fcompiler/__init__.py3
1 files changed, 1 insertions, 2 deletions
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)