summaryrefslogtreecommitdiff
path: root/numpy/build_utils/waf.py
diff options
context:
space:
mode:
authorDavid Cournapeau <cournape@gmail.com>2012-08-27 15:01:34 +0200
committerDavid Cournapeau <cournape@gmail.com>2012-09-06 11:17:40 +0100
commitef61260e9ecc21b273ca4655db511d9636c8b441 (patch)
treeb551b9ad612244fd9abdd1b99b019da8ffc0dd81 /numpy/build_utils/waf.py
parent2d48841465749f36f3b7129266630d1bd99676fa (diff)
downloadnumpy-ef61260e9ecc21b273ca4655db511d9636c8b441.tar.gz
BUG: fix custom post_check.
Diffstat (limited to 'numpy/build_utils/waf.py')
-rw-r--r--numpy/build_utils/waf.py14
1 files changed, 7 insertions, 7 deletions
diff --git a/numpy/build_utils/waf.py b/numpy/build_utils/waf.py
index 051cf27e0..ab49ecea9 100644
--- a/numpy/build_utils/waf.py
+++ b/numpy/build_utils/waf.py
@@ -412,15 +412,15 @@ def check_ldouble_representation(conf, **kw):
def post_check(self, *k, **kw):
"set the variables after a test was run successfully"
- is_success = 0
+ is_success = False
if kw['execute']:
if kw['success'] is not None:
- is_success = kw['success']
+ if kw.get('define_ret', False):
+ is_success = kw['success']
+ else:
+ is_success = (kw['success'] == 0)
else:
- if kw["success"] == 0:
- is_success = 1
- else:
- is_success = 0
+ is_success = (kw['success'] == 0)
def define_or_stuff():
nm = kw['define_name']
@@ -453,7 +453,7 @@ def post_check(self, *k, **kw):
if isinstance(val, str):
val = val.rstrip(os.path.sep)
self.env.append_unique(k + '_' + kw['uselib_store'], val)
- return is_success
+ return is_success
@waflib.Configure.conf
def define_with_comment(conf, define, value, comment=None, quote=True):