diff options
Diffstat (limited to 'numpy/core/setup.py')
-rw-r--r-- | numpy/core/setup.py | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/numpy/core/setup.py b/numpy/core/setup.py index aa6450207..03a389700 100644 --- a/numpy/core/setup.py +++ b/numpy/core/setup.py @@ -41,10 +41,8 @@ def configuration(parent_package='',top_path=None): nosmp = 1 except KeyError: nosmp = 0 - if nosmp: - moredefs = [('NPY_ALLOW_THREADS', '0')] - else: - moredefs = [('NPY_ALLOW_THREADS','WITH_THREAD')] + if nosmp: moredefs = [('NPY_ALLOW_THREADS', '0')] + else: moredefs = [] # mathlibs = [] tc = testcode_mathlib() @@ -96,6 +94,8 @@ def configuration(parent_package='',top_path=None): 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 = [] |