diff --git a/waflib/Node.py b/waflib/Node.py index c86c4c13..7c555b68 100644 --- a/waflib/Node.py +++ b/waflib/Node.py @@ -581,34 +581,6 @@ class Node(object): return ret - def find_nodes(self, find_dirs=True, find_files=True, match_fun=lambda x: True): - # FIXME not part of the stable API: find_node vs find_nodes? consistency with argument names on other functions? - x = """ - Recursively finds nodes:: - - def configure(cnf): - cnf.find_nodes() - - :param find_dirs: whether to return directories - :param find_files: whether to return files - :param match_fun: matching function, taking a node as parameter - :rtype generator - :return: a generator that iterates over all the requested files - """ - files = self.listdir() - for f in files: - node = self.make_node([f]) - if os.path.isdir(node.abspath()): - if find_dirs and match_fun(node): - yield node - gen = node.find_nodes(find_dirs, find_files, match_fun) - for g in gen: - yield g - else: - if find_files and match_fun(node): - yield node - - # -------------------------------------------------------------------------------- # the following methods require the source/build folders (bld.srcnode/bld.bldnode) # using a subclass is a possibility, but is that really necessary? diff --git a/waflib/TaskGen.py b/waflib/TaskGen.py index b5def00d..23a0a94f 100644 --- a/waflib/TaskGen.py +++ b/waflib/TaskGen.py @@ -586,8 +586,7 @@ def process_rule(self): if getattr(self, 'cwd', None): tsk.cwd = self.cwd - # TODO remove on_results in waf 1.7 - if getattr(self, 'update_outputs', None) or getattr(self, 'on_results', None): + if getattr(self, 'update_outputs', None): Task.update_outputs(cls) if getattr(self, 'always', None): diff --git a/waflib/Tools/c_config.py b/waflib/Tools/c_config.py index ee1c5c2c..89dc83d0 100644 --- a/waflib/Tools/c_config.py +++ b/waflib/Tools/c_config.py @@ -6,9 +6,9 @@ C/C++/D configuration helpers """ -import os, imp, sys, re, shlex, shutil -from waflib import Build, Utils, Configure, Task, Options, Logs, TaskGen, Errors, ConfigSet, Runner -from waflib.TaskGen import before_method, after_method, feature +import os, re, shlex, sys +from waflib import Build, Utils, Task, Options, Logs, Errors, ConfigSet, Runner +from waflib.TaskGen import after_method, feature from waflib.Configure import conf WAF_CONFIG_H = 'config.h' @@ -40,12 +40,6 @@ int main() { ''' """Code template for checking for types""" -SNIP_CLASS = ''' -int main() { - if ( -} -''' - SNIP_EMPTY_PROGRAM = ''' int main() { return 0; @@ -354,7 +348,7 @@ def check_cfg(self, *k, **kw): ret = None try: ret = self.exec_cfg(kw) - except self.errors.WafError as e: + except self.errors.WafError: if 'errmsg' in kw: self.end_msg(kw['errmsg'], 'YELLOW') if Logs.verbose > 1: @@ -567,7 +561,6 @@ def post_check(self, *k, **kw): if 'define_name' in kw: # TODO simplify? if 'header_name' in kw or 'function_name' in kw or 'type_name' in kw or 'fragment' in kw: - nm = kw['define_name'] if kw['execute'] and kw.get('define_ret', None) and isinstance(is_success, str): self.define(kw['define_name'], is_success, quote=kw.get('quote', 1)) else: @@ -612,7 +605,7 @@ def check(self, *k, **kw): ret = None try: ret = self.run_c_code(*k, **kw) - except self.errors.ConfigurationError as e: + except self.errors.ConfigurationError: self.end_msg(kw['errmsg'], 'YELLOW') if Logs.verbose > 1: raise