8000 MAINT: Add check to pass tests [f2py] · numpy/numpy@764d6e6 · GitHub
[go: up one dir, main page]

Skip to content

Commit 764d6e6

Browse files
committed
MAINT: Add check to pass tests [f2py]
1 parent a6cc6a5 commit 764d6e6

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

numpy/f2py/f2py2e.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -603,7 +603,7 @@ def run_compile():
603603
for s in flib_flags:
604604
v = '--fcompiler='
605605
if s[:len(v)] == v:
606-
if sys.version_info >= (3, 12):
606+
if MESON_ONLY_VER or backend_key == 'meson':
607607
outmess(
608608
"--fcompiler cannot be used with meson,"
609609
"set compiler with the FC environment variable\n"

numpy/f2py/tests/test_f2py2e.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -157,7 +157,7 @@ def test_gen_pyf_no_overwrite(capfd, hello_world_f90, monkeypatch):
157157
assert "Use --overwrite-signature to overwrite" in err
158158

159159

160-
@pytest.mark.skipif(platform.system() != 'Linux', reason='Compiler required')
160+
@pytest.mark.skipif(platform.system() != 'Linux' or sys.version_info <= (3, 12), reason='Compiler and 3.12 required')
161161
def test_no_py312_distutils_fcompiler(capfd, hello_world_f90, monkeypatch):
162162
"""Check that no distutils imports are performed on 3.12
163163
CLI :: --fcompiler --help-link --backend distutils
@@ -166,7 +166,7 @@ def test_no_py312_distutils_fcompiler(capfd, hello_world_f90, monkeypatch):
166166
foutl = get_io_paths(hello_world_f90, mname=MNAME)
167167
ipath = foutl.f90inp
168168
monkeypatch.setattr(
169-
sys, "argv", f"f2py {ipath} --backend meson -c --fcompiler=gfortran -m {MNAME}".split()
169+
sys, "argv", f"f2py {ipath} -c --fcompiler=gfortran -m {MNAME}".split()
170170
)
171171
with util.switchdir(ipath.parent):
172172
f2pycli()

0 commit comments

Comments
 (0)
0