#NEWLINE# def __call__( self , pattern , dst = '' , src = '' , keep_path = True ) : #NEWLINE# #INDENT# ' FileCopier is lazy, it just store requested copies, and execute them later\n        param pattern: an fnmatch file pattern of the files that should be copied. Eg. *.dll\n        param dst: the destination local folder, wrt to current conanfile dir, to which\n                   the files will be copied. Eg: "bin"\n        param src: the source folder in which those files will be searched. This folder\n                   will be stripped from the dst name. Eg.: lib/Debug/x86\n        param keep_path: False if you want the relative paths to be maintained from\n                         src to dst folders, or just drop. False is useful if you want\n                         to collect e.g. many *.libs among many dirs into a single\n                         lib dir\n        return: list of copied files\n        ' #NEWLINE# reldir = os . path . abspath ( os . path . join ( self . _base_src , pattern ) ) #NEWLINE# if self . _base_src . startswith ( os . path . dirname ( reldir ) ) : #NEWLINE# #INDENT# self . _base_src = os . path . dirname ( reldir ) #NEWLINE# pattern = os . path . basename ( reldir ) #NEWLINE# #UNINDENT# copied_files = [ ] #NEWLINE# src = os . path . join ( self . _base_src , src ) #NEWLINE# dst = os . path . join ( self . _base_dst , dst ) #NEWLINE# for ( root , subfolders , files ) in os . walk ( src , followlinks = True ) : #NEWLINE# #INDENT# relative_path = os . path . relpath ( root , src ) #NEWLINE# if ( os . path . basename ( root ) in [ '.git' , '.svn' ] ) : #NEWLINE# #INDENT# subfolders [ : ] = [ ] #NEWLINE# continue #NEWLINE# #UNINDENT# for f in files : #NEWLINE# #INDENT# relative_name = os . path . normpath ( os . path . join ( relative_path , f ) ) #NEWLINE# if fnmatch . fnmatch ( relative_name , pattern ) : #NEWLINE# #INDENT# abs_src_name = os . path . join ( root , f ) #NEWLINE# filename = ( relative_name if keep_path else f ) #NEWLINE# abs_dst_name = os . path . normpath ( os . path . join ( dst , filename ) ) #NEWLINE# try : #NEWLINE# #INDENT# os . makedirs ( os . path . dirname ( abs_dst_name ) ) #NEWLINE# #UNINDENT# except : #NEWLINE# #INDENT# pass #NEWLINE# #UNINDENT# shutil . copy2 ( abs_src_name , abs_dst_name ) #NEWLINE# copied_files . append ( abs_dst_name ) #NEWLINE# self . _copied . append ( relative_name ) #NEWLINE# #UNINDENT# #UNINDENT# #UNINDENT# return copied_files