parameters: (self)
docstring: Creates the buildcopy task.
docstring_summary: Creates the buildcopy task.
docstring_tokens: Creates the buildcopy task .
function: def make_buildcopy(self):
  	"""
  	Creates the buildcopy task.
  	"""
  	def to_src_nodes(lst):
  		"""Find file nodes only in src, TaskGen.to_nodes will not work for this since it gives
  		preference to nodes in build.
  		"""
  		if isinstance(lst, Node.Node):
  			if not lst.is_src():
  				raise Errors.WafError('buildcopy: node %s is not in src'%lst)
  			if not os.path.isfile(lst.abspath()):
  				raise Errors.WafError('buildcopy: Cannot copy directory %s (unsupported action)'%lst)
  			return lst
  
  		if isinstance(lst, str):
  			lst = [x for x in Utils.split_path(lst) if x and x != '.']
  
  		node = self.bld.path.get_src().search_node(lst)
  		if node:
  			if not os.path.isfile(node.abspath()):
  				raise Errors.WafError('buildcopy: Cannot copy directory %s (unsupported action)'%node)
  			return node
  
  		node = self.bld.path.get_src().find_node(lst)
  		if node:
  			if not os.path.isfile(node.abspath()):
  				raise Errors.WafError('buildcopy: Cannot copy directory %s (unsupported action)'%node)
  			return node
  		raise Errors.WafError('buildcopy: File not found in src: %s'%os.path.join(*lst))
  
  	nodes = [ to_src_nodes(n) for n in getattr(self, 'buildcopy_source', getattr(self, 'source', [])) ]
  	if not nodes:
  		Logs.warn('buildcopy: No source files provided to buildcopy in %s (set `buildcopy_source` or `source`)',
  			self)
  		return
  	node_pairs = [(n, n.get_bld()) for n in nodes]
  	self.create_task('buildcopy', [n[0] for n in node_pairs], [n[1] for n in node_pairs], node_pairs=node_pairs)
function_tokens: def make_buildcopy ( self ) : def to_src_nodes ( lst ) : """Find file nodes only in src, TaskGen.to_nodes will not work for this since it gives
  		preference to nodes in build.
  		""" if isinstance ( lst , Node . Node ) : if not lst . is_src ( ) : raise Errors . WafError ( 'buildcopy: node %s is not in src' % lst ) if not os . path . isfile ( lst . abspath ( ) ) : raise Errors . WafError ( 'buildcopy: Cannot copy directory %s (unsupported action)' % lst ) return lst if isinstance ( lst , str ) : lst = [ x for x in Utils . split_path ( lst ) if x and x != '.' ] node = self . bld . path . get_src ( ) . search_node ( lst ) if node : if not os . path . isfile ( node . abspath ( ) ) : raise Errors . WafError ( 'buildcopy: Cannot copy directory %s (unsupported action)' % node ) return node node = self . bld . path . get_src ( ) . find_node ( lst ) if node : if not os . path . isfile ( node . abspath ( ) ) : raise Errors . WafError ( 'buildcopy: Cannot copy directory %s (unsupported action)' % node ) return node raise Errors . WafError ( 'buildcopy: File not found in src: %s' % os . path . join ( * lst ) ) nodes = [ to_src_nodes ( n ) for n in getattr ( self , 'buildcopy_source' , getattr ( self , 'source' , [ ] ) ) ] if not nodes : Logs . warn ( 'buildcopy: No source files provided to buildcopy in %s (set `buildcopy_source` or `source`)' , self ) return node_pairs = [ ( n , n . get_bld ( ) ) for n in nodes ] self . create_task ( 'buildcopy' , [ n [ 0 ] for n in node_pairs ] , [ n [ 1 ] for n in node_pairs ] , node_pairs = node_pairs )