diff options
author | Travis Oliphant <oliphant@enthought.com> | 2006-07-18 08:55:56 +0000 |
---|---|---|
committer | Travis Oliphant <oliphant@enthought.com> | 2006-07-18 08:55:56 +0000 |
commit | 702655e4c2371e525cdc3d27e30a16e2be5b7037 (patch) | |
tree | 0799354ed233cb07ace6b66ed3cc66c6be60edcf /numpy/core/setup.py | |
parent | 958601cb55c15930a443057d61230a6aa5a45c02 (diff) | |
download | numpy-702655e4c2371e525cdc3d27e30a16e2be5b7037.tar.gz |
Change so that WITH_THREAD is used in a define statement
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 = [] |