def _FindApiJars(lib_dir):
 result = {}
 for jar_file in _FilesMatching(lib_dir, (lambda f: f.endswith('.jar'))):
  manifest = jarfile.ReadManifest(jar_file)
  if manifest:
   section = manifest.sections.get('com/google/appengine/api/')
   if (section and ('Specification-Version' in section)):
    result[jar_file] = section['Specification-Version']
 return result

def _FindApiJars ( lib_dir ) : result = { } for jar_file in _FilesMatching ( lib_dir , ( lambda f : f . endswith ( '.jar' ) ) ) : manifest = jarfile . ReadManifest ( jar_file ) if manifest : section = manifest . sections . get ( 'com/google/appengine/api/' ) if ( section and ( 'Specification-Version' in section ) ) : result [ jar_file ] = section [ 'Specification-Version' ] return result
find the appengine-api-* .