Currently f2py has two separate paths within f2py2e which do "almost the same thing". run_main is supposed to do everything but -c and run_compile() is supposed to compile to a module. There is a lot of technical debt being carried here, run_compile() shouldn't be doing anything different from run_main in the first place. This also leads to subtle bugs since the results of -c and regular f2py runs are often different. It also makes it hard to test the CLI well (at the very least, doubles the number of possible tests).
Currently
f2pyhas two separate paths withinf2py2ewhich do "almost the same thing".run_mainis supposed to do everything but-candrun_compile()is supposed to compile to a module. There is a lot of technical debt being carried here,run_compile()shouldn't be doing anything different fromrun_mainin the first place. This also leads to subtle bugs since the results of-cand regularf2pyruns are often different. It also makes it hard to test the CLI well (at the very least, doubles the number of possible tests).