summaryrefslogtreecommitdiff
path: root/numpy/core/setup.py
diff options
context:
space:
mode:
authorTravis Oliphant <oliphant@enthought.com>2006-07-18 06:24:09 +0000
committerTravis Oliphant <oliphant@enthought.com>2006-07-18 06:24:09 +0000
commitb098d6252f944b814663d4dbf9ac4e08c4e15e38 (patch)
treed2028135b9c5b6d9c95fe9b3fe0b03597964a020 /numpy/core/setup.py
parent6e3790036dab34159c6973c64d6e5626db64b829 (diff)
downloadnumpy-b098d6252f944b814663d4dbf9ac4e08c4e15e38.tar.gz
Fix-up usage of NPY_ALLOW_THREADS. Default is now WITH_THREAD but an environment variable NUMPY_NOSMP can be set which will make the default 0
Diffstat (limited to 'numpy/core/setup.py')
-rw-r--r--numpy/core/setup.py12
1 files changed, 10 insertions, 2 deletions
diff --git a/numpy/core/setup.py b/numpy/core/setup.py
index fa42f2aaf..aa6450207 100644
--- a/numpy/core/setup.py
+++ b/numpy/core/setup.py
@@ -35,8 +35,16 @@ def configuration(parent_package='',top_path=None):
library_dirs = default_lib_dirs)
if not result:
raise "ERROR: Failed to test configuration"
- moredefs = []
-
+ # Perhaps a fancier check is in order here.
+ try:
+ nosmp = os.environ['NPY_NOSMP']
+ nosmp = 1
+ except KeyError:
+ nosmp = 0
+ if nosmp:
+ moredefs = [('NPY_ALLOW_THREADS', '0')]
+ else:
+ moredefs = [('NPY_ALLOW_THREADS','WITH_THREAD')]
#
mathlibs = []
tc = testcode_mathlib()