def _fix_data_paths(package_data_dict):
 result = {}
 for (package_name, package_content) in package_data_dict.items():
  package_structure = package_name.split('.')
  package_structure_1st_level = package_structure[1]
  result[package_name] = []
  for p in package_content:
   path_structure = p.split(os.path.sep)
   path_structure_1st_level = path_structure[0]
   if (package_structure_1st_level == path_structure_1st_level):
    path = os.path.join(*path_structure[1:])
   else:
    path = p
   result[package_name].append(path)
 return result

def _fix_data_paths ( package_data_dict ) : result = { } for ( package_name , package_content ) in package_data_dict . items ( ) : package_structure = package_name . split ( '.' ) package_structure_1st_level = package_structure [ 1 ] result [ package_name ] = [ ] for p in package_content : path_structure = p . split ( os . path . sep ) path_structure_1st_level = path_structure [ 0 ] if ( package_structure_1st_level == path_structure_1st_level ) : path = os . path . join ( * path_structure [ 1 : ] ) else : path = p result [ package_name ] . append ( path ) return result
corrects package data paths when the package name is compound .