def check_package_data(package_data):
 print 'checking package data'
 for (pkg, data) in package_data.items():
  pkg_root = pjoin(*pkg.split('.'))
  for d in data:
   path = pjoin(pkg_root, d)
   if ('*' in path):
    assert (len(glob(path)) > 0), ('No files match pattern %s' % path)
   else:
    assert os.path.exists(path), ('Missing package data: %s' % path)

def check_package_data ( package_data ) : print 'checking package data' for ( pkg , data ) in package_data . items ( ) : pkg_root = pjoin ( * pkg . split ( '.' ) ) for d in data : path = pjoin ( pkg_root , d ) if ( '*' in path ) : assert ( len ( glob ( path ) ) > 0 ) , ( 'No files match pattern %s' % path ) else : assert os . path . exists ( path ) , ( 'Missing package data: %s' % path )
verify that package_data globs make sense .