[Numpy-svn] r5764 - branches/clean_math_config/numpy/core

numpy-svn@scip... numpy-svn@scip...
Thu Sep 4 10:32:00 CDT 2008


Author: cdavid
Date: 2008-09-04 10:31:57 -0500 (Thu, 04 Sep 2008)
New Revision: 5764

Modified:
   branches/clean_math_config/numpy/core/setup.py
Log:
Check for non-mandatory, basic, double functions.

Modified: branches/clean_math_config/numpy/core/setup.py
===================================================================
--- branches/clean_math_config/numpy/core/setup.py	2008-09-04 15:12:45 UTC (rev 5763)
+++ branches/clean_math_config/numpy/core/setup.py	2008-09-04 15:31:57 UTC (rev 5764)
@@ -56,15 +56,27 @@
     def name_to_defsymb(name):
         return "HAVE_%s" % name.upper()
 
+    # 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"]
 
+    # Standard functions which may not be available and for which we have a
+    # replacement implementation
+    # XXX: we do not test for hypot because python checks for it (HAVE_HYPOT in
+    # python.h... I wish they would clean their public headers someday)
+    optional_stdfuncs = ["expm1", "log1p", "acosh", "asinh", "atanh",
+                         "rint", "trunc"]
+
     for f in mandatory_funcs:
         if not check_func(f):
             raise SystemError("Function %s is mandatory to build numpy." % f)
         moredefs.append(name_to_defsymb(f))
 
+    for f in optional_stdfuncs:
+        if check_func(f):
+            moredefs.append(name_to_defsymb(f))
+
 #    for func_name, defsymbol in FUNCTIONS_TO_CHECK:
 #        if check_func(func_name):
 #            moredefs.append(defsymbol)



More information about the Numpy-svn mailing list