8000 BUG: fix custom post_check. · 87/numpy@ef61260 · GitHub
[go: up one dir, main page]

Skip to content

Commit ef61260

Browse files
committed
BUG: fix custom post_check.
8000
1 parent 2d48841 commit ef61260

File tree

1 file changed

+7
-7
lines changed

1 file changed

+7
-7
lines changed

numpy/build_utils/waf.py

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -412,15 +412,15 @@ def check_ldouble_representation(conf, **kw):
412412
def post_check(self, *k, **kw):
413413
"set the variables after a test was run successfully"
414414

415-
is_success = 0
415+
is_success = False
416416
if kw['execute']:
417417
if kw['success'] is not None:
418-
is_success = kw['success']
418+
if kw.get('define_ret', False):
419+
is_success = kw['success']
420+
else:
421+
is_success = (kw['success'] == 0)
419422
else:
420-
if kw["success"] == 0:
421-
is_success = 1
422-
else:
423-
is_success = 0
423+
is_success = (kw['success'] == 0)
424424

425425
def define_or_stuff():
426426
nm = kw['define_name']
@@ -453,7 +453,7 @@ def define_or_stuff():
453453
if isinstance(val, str):
454454
val = val.rstrip(os.path.sep)
455455
self.env.append_unique(k + '_' + kw['uselib_store'], val)
456-
return is_success
456+
return is_success
457457

458458
@waflib.Configure.conf
459459
def define_with_comment(conf, define, value, comment=None, quote=True):

0 commit comments

Comments
 (0)
0