diff options
author | Travis Oliphant <oliphant@enthought.com> | 2006-08-18 19:09:11 +0000 |
---|---|---|
committer | Travis Oliphant <oliphant@enthought.com> | 2006-08-18 19:09:11 +0000 |
commit | a601525837bd2357c7a428942add2907c623f91a (patch) | |
tree | bd3a08ced207038d1384da7d23377a2dade1bbcb /numpy/core/setup.py | |
parent | 6e809f2fc0e4101951beb53c6442876ce79656e3 (diff) | |
download | numpy-a601525837bd2357c7a428942add2907c623f91a.tar.gz |
Fix logic for using THREADS
Diffstat (limited to 'numpy/core/setup.py')
-rw-r--r-- | numpy/core/setup.py | 19 |
1 files changed, 9 insertions, 10 deletions
diff --git a/numpy/core/setup.py b/numpy/core/setup.py index 04e7e7ee7..ac7277489 100644 --- a/numpy/core/setup.py +++ b/numpy/core/setup.py @@ -102,16 +102,15 @@ def configuration(parent_package='',top_path=None): 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) |