[Numpy-svn] r3037 - trunk/numpy/core

numpy-svn at scipy.org numpy-svn at scipy.org
Fri Aug 18 14:09:12 CDT 2006


Author: oliphant
Date: 2006-08-18 14:09:11 -0500 (Fri, 18 Aug 2006)
New Revision: 3037

Modified:
   trunk/numpy/core/setup.py
Log:
Fix logic for using THREADS

Modified: trunk/numpy/core/setup.py
===================================================================
--- trunk/numpy/core/setup.py	2006-08-18 17:06:11 UTC (rev 3036)
+++ trunk/numpy/core/setup.py	2006-08-18 19:09:11 UTC (rev 3037)
@@ -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)



More information about the Numpy-svn mailing list