def package_data(pkg, root_list):
 data = []
 for root in root_list:
  for (dirname, _, files) in os.walk(os.path.join(pkg, root)):
   for fname in files:
    data.append(os.path.relpath(os.path.join(dirname, fname), pkg))
 return {pkg: data}

def package_data ( pkg , root_list ) : data = [ ] for root in root_list : for ( dirname , _ , files ) in os . walk ( os . path . join ( pkg , root ) ) : for fname in files : data . append ( os . path . relpath ( os . path . join ( dirname , fname ) , pkg ) ) return { pkg : data }
by default .