numpy / numpy/numpy

f2py false positive exit status by unknown option

Open
#31,409 2 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
Python
Stars
32.8k
Forks
12.8k
Avg merge
1d 7h
Merged PRs (30d)
197

Description

parallels@vmd9leom:~/soft/my/fortran_magic$ python -m numpy.f2py -v
2.4.3
parallels@vmd9leom:~/soft/my/fortran_magic$ python -m numpy.f2py -c lost-file.f90 --unknown-option && echo "False-positive: $?"
Cannot use distutils backend with Python>=3.12, using meson backend instead.
Using meson backend
Will pass --lower to f2py
See https://numpy.org/doc/stable/f2py/buildtools/meson.html
OSError: [Errno 2] No such file or directory: 'lost-file.f90'. Skipping file "lost-file.f90".
Unknown option '--unknown-option'
False-positive: 0

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by reproducing the command through the python -m numpy.f2py entry point, using the missing lost-file.f90 and --unknown-option shown in the report. Trace how f2py handles the missing source and unknown option, then verify that this invocation exits nonzero instead of printing a false-positive success status.

Written by the indexing model from the issue text.

Assessment

Tech stack
numpy, python
Domain
build-system, cli
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Quiet
Clarity
Mostly clear
Newbie friendliness
58/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.