def wheel_version(source_dir):
 try:
  dist = [d for d in pkg_resources.find_on_path(None, source_dir)][0]
  wheel_data = dist.get_metadata('WHEEL')
  wheel_data = Parser().parsestr(wheel_data)
  version = wheel_data['Wheel-Version'].strip()
  version = tuple(map(int, version.split('.')))
  return version
 except:
  return False

def wheel_version ( source_dir ) : try : dist = [ d for d in pkg_resources . find_on_path ( None , source_dir ) ] [ 0 ] wheel_data = dist . get_metadata ( 'WHEEL' ) wheel_data = Parser ( ) . parsestr ( wheel_data ) version = wheel_data [ 'Wheel-Version' ] . strip ( ) version = tuple ( map ( int , version . split ( '.' ) ) ) return version except : return False
return the wheel-version of an extracted wheel .