Hi there,

in numpy-1.0b2 the logic in setup.py is slightly off. The attached patch
fixes the issue.

Greetings,
Norbert

PS: I would have preferred to submit this patch via the sourceforge
bug-tracker, but that seems rather confusing: there are tabs "Numarray
Patches" and "Numarray Bugs" but no "NumPy bugs" and the tab "Patches"
seems to be used for Numeric. Why isn't NumPy handled via the
Sourceforge page?
Index: numpy/numpy/core/setup.py
===================================================================
--- numpy.orig/numpy/core/setup.py      2006-08-13 02:06:58.000000000 +0200
+++ numpy/numpy/core/setup.py   2006-08-18 15:22:10.000000000 +0200
@@ -102,16 +102,15 @@
                 if check_func('strtod'):
                     moredefs.append(('PyOS_ascii_strtod', 'strtod'))
 
-            if moredefs:
-                target_f = open(target,'a')
-                for d in moredefs:
-                    if isinstance(d,str):
-                        target_f.write('#define %s\n' % (d))
-                    else:
-                        target_f.write('#define %s %s\n' % (d[0],d[1]))
-                if not nosmp:  # default is to use WITH_THREAD
-                    target_f.write('#ifdef WITH_THREAD\n#define 
NPY_ALLOW_THREADS 1\n#else\n#define NPY_ALLOW_THREADS 0\n#endif\n')
-                target_f.close()
+            target_f = open(target,'a')
+            for d in moredefs:
+                if isinstance(d,str):
+                    target_f.write('#define %s\n' % (d))
+                else:
+                    target_f.write('#define %s %s\n' % (d[0],d[1]))
+            if not nosmp:  # default is to use WITH_THREAD
+                target_f.write('#ifdef WITH_THREAD\n#define NPY_ALLOW_THREADS 
1\n#else\n#define NPY_ALLOW_THREADS 0\n#endif\n')
+            target_f.close()
         else:
             mathlibs = []
             target_f = open(target)
-------------------------------------------------------------------------
Using Tomcat but need to do more? Need to support web services, security?
Get stuff done quickly with pre-integrated technology to make your job easier
Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642
_______________________________________________
Numpy-discussion mailing list
Numpy-discussion@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/numpy-discussion

Reply via email to