summaryrefslogtreecommitdiff
path: root/numpy/core/setup_common.py
diff options
context:
space:
mode:
authorDavid Cournapeau <cournape@gmail.com>2009-03-13 05:10:09 +0000
committerDavid Cournapeau <cournape@gmail.com>2009-03-13 05:10:09 +0000
commitce0dd445df43ad444c5adc072d6e1122f548be7f (patch)
treeb3139589cb05778af9de68bca5342c4d6b4f8ec3 /numpy/core/setup_common.py
parentebd770a34e4d2e9326eca18e5a45c14ab75c56f0 (diff)
downloadnumpy-ce0dd445df43ad444c5adc072d6e1122f548be7f.tar.gz
Put math funcs to test in separate file to share with numscons build.
Diffstat (limited to 'numpy/core/setup_common.py')
-rw-r--r--numpy/core/setup_common.py24
1 files changed, 24 insertions, 0 deletions
diff --git a/numpy/core/setup_common.py b/numpy/core/setup_common.py
new file mode 100644
index 000000000..e95fbff9a
--- /dev/null
+++ b/numpy/core/setup_common.py
@@ -0,0 +1,24 @@
+# Code shared by distutils and scons builds
+
+# Mandatory functions: if not found, fail the build
+MANDATORY_FUNCS = ["sin", "cos", "tan", "sinh", "cosh", "tanh", "fabs",
+ "floor", "ceil", "sqrt", "log10", "log", "exp", "asin",
+ "acos", "atan", "fmod", 'modf', 'frexp', 'ldexp']
+
+# Standard functions which may not be available and for which we have a
+# replacement implementation. Note that some of these are C99 functions.
+OPTIONAL_STDFUNCS = ["expm1", "log1p", "acosh", "asinh", "atanh",
+ "rint", "trunc", "exp2", "log2"]
+
+# Subset of OPTIONAL_STDFUNCS which may alreay have HAVE_* defined by Python.h
+OPTIONAL_STDFUNCS_MAYBE = ["expm1", "log1p", "acosh", "atanh", "asinh"]
+
+# C99 functions: float and long double versions
+C99_FUNCS = ["sin", "cos", "tan", "sinh", "cosh", "tanh", "fabs", "floor",
+ "ceil", "rint", "trunc", "sqrt", "log10", "log", "log1p", "exp",
+ "expm1", "asin", "acos", "atan", "asinh", "acosh", "atanh",
+ "hypot", "atan2", "pow", "fmod", "modf", 'frexp', 'ldexp',
+ "exp2", "log2"]
+
+C99_FUNCS_SINGLE = [f + 'f' for f in C99_FUNCS]
+C99_FUNCS_EXTENDED = [f + 'l' for f in C99_FUNCS]