MCPcopy Create free account
hub / github.com/numpy/numpy / find_f2py_commands

Function find_f2py_commands

numpy/tests/test_scripts.py:17–32  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

15
16
17def find_f2py_commands():
18 if sys.platform == 'win32':
19 exe_dir = dirname(sys.executable)
20 if exe_dir.endswith('Scripts'): # virtualenv
21 return [os.path.join(exe_dir, 'f2py')]
22 else:
23 return [os.path.join(exe_dir, "Scripts", 'f2py')]
24 else:
25 # Three scripts are installed in Unix-like systems:
26 # 'f2py', 'f2py{major}', and 'f2py{major.minor}'. For example,
27 # if installed with python3.9 the scripts would be named
28 # 'f2py', 'f2py3', and 'f2py3.9'.
29 version = sys.version_info
30 major = str(version.major)
31 minor = str(version.minor)
32 return ['f2py', 'f2py' + major, 'f2py' + major + '.' + minor]
33
34
35@pytest.mark.skipif(is_inplace, reason="Cannot test f2py command inplace")

Callers

nothing calls this directly

Calls 2

endswithMethod · 0.80
joinMethod · 0.45

Tested by

no test coverage detected