Anonymous avatar Anonymous committed 22961a0

Cleanup for waf 1.7

Comments (0)

Files changed (3)

 
 		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?

waflib/TaskGen.py

 	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):

waflib/Tools/c_config.py

 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'
 '''
 """Code template for checking for types"""
 
-SNIP_CLASS = '''
-int main() {
-	if (
-}
-'''
-
 SNIP_EMPTY_PROGRAM = '''
 int main() {
 	return 0;
 	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:
 	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:
 	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
Tip: Filter by directory path e.g. /media app.js to search for public/media/app.js.
Tip: Use camelCasing e.g. ProjME to search for ProjectModifiedEvent.java.
Tip: Filter by extension type e.g. /repo .js to search for all .js files in the /repo directory.
Tip: Separate your search with spaces e.g. /ssh pom.xml to search for src/ssh/pom.xml.
Tip: Use ↑ and ↓ arrow keys to navigate and return to view the file.
Tip: You can also navigate files with Ctrl+j (next) and Ctrl+k (previous) and view the file with Ctrl+o.
Tip: You can also navigate files with Alt+j (next) and Alt+k (previous) and view the file with Alt+o.