def collect_system_data_files(path, destdir=None, include_py_files=False):
 if (not isinstance(path, string_types)):
  raise ValueError
 datas = []
 for (dirpath, dirnames, files) in os.walk(path):
  for f in files:
   extension = os.path.splitext(f)[1]
   if (include_py_files or (extension not in PY_IGNORE_EXTENSIONS)):
    source = os.path.join(dirpath, f)
    dest = remove_prefix(dirpath, (os.path.dirname(path) + os.sep))
    if (destdir is not None):
     dest = os.path.join(destdir, dest)
    datas.append((source, dest))
 return datas

def collect_system_data_files ( path , destdir = None , include_py_files = False ) : if ( not isinstance ( path , string_types ) ) : raise ValueError datas = [ ] for ( dirpath , dirnames , files ) in os . walk ( path ) : for f in files : extension = os . path . splitext ( f ) [ 1 ] if ( include_py_files or ( extension not in PY_IGNORE_EXTENSIONS ) ) : source = os . path . join ( dirpath , f ) dest = remove_prefix ( dirpath , ( os . path . dirname ( path ) + os . sep ) ) if ( destdir is not None ) : dest = os . path . join ( destdir , dest ) datas . append ( ( source , dest ) ) return datas
this routine produces a list of non-python files which reside somewhere on the system .