diff options
author | Matti Picus <matti.picus@gmail.com> | 2022-10-06 09:17:15 +0300 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-10-06 09:17:15 +0300 |
commit | 562c80a9fb6ffae6f8d02abf6687437830bb6615 (patch) | |
tree | c1b3b962c22f5a18352e28d9dd4bc0cae1cd0a67 /numpy/core/setup.py | |
parent | 5ecaf36cd34aff6886e95a6fb10715b27ecdaa3e (diff) | |
parent | 05e213e85d165a74b11fe38a7fb95a48494f8c5f (diff) | |
download | numpy-562c80a9fb6ffae6f8d02abf6687437830bb6615.tar.gz |
Merge pull request #22161 from mattip/simplify-npy_math2
MAINT: simplify complex math function handling in npymath
Diffstat (limited to 'numpy/core/setup.py')
-rw-r--r-- | numpy/core/setup.py | 12 |
1 files changed, 8 insertions, 4 deletions
diff --git a/numpy/core/setup.py b/numpy/core/setup.py index 3a239a70e..17dc8438e 100644 --- a/numpy/core/setup.py +++ b/numpy/core/setup.py @@ -134,7 +134,7 @@ def check_math_capabilities(config, ext, moredefs, mathlibs): def check_func( func_name, decl=False, - headers=["feature_detection_math.h"], + headers=["feature_detection_math.h", "feature_detection_cmath.h"], ): return config.check_func( func_name, @@ -145,8 +145,10 @@ def check_math_capabilities(config, ext, moredefs, mathlibs): headers=headers, ) - def check_funcs_once(funcs_name, headers=["feature_detection_math.h"], - add_to_moredefs=True): + def check_funcs_once( + funcs_name, + headers=["feature_detection_math.h", "feature_detection_cmath.h"], + add_to_moredefs=True): call = dict([(f, True) for f in funcs_name]) call_args = dict([(f, FUNC_CALL_ARGS[f]) for f in funcs_name]) st = config.check_funcs_once( @@ -161,7 +163,9 @@ def check_math_capabilities(config, ext, moredefs, mathlibs): moredefs.extend([(fname2def(f), 1) for f in funcs_name]) return st - def check_funcs(funcs_name, headers=["feature_detection_math.h"]): + def check_funcs( + funcs_name, + headers=["feature_detection_math.h", "feature_detection_cmath.h"]): # Use check_funcs_once first, and if it does not work, test func per # func. Return success only if all the functions are available if not check_funcs_once(funcs_name, headers=headers): |