def _norm_version(version, build=''):
 l = version.split('.')
 if build:
  l.append(build)
 try:
  ints = map(int, l)
 except ValueError:
  strings = l
 else:
  strings = list(map(str, ints))
 version = '.'.join(strings[:3])
 return version

def _norm_version ( version , build = '' ) : l = version . split ( '.' ) if build : l . append ( build ) try : ints = map ( int , l ) except ValueError : strings = l else : strings = list ( map ( str , ints ) ) version = '.' . join ( strings [ : 3 ] ) return version
normalize the version and build strings and return a single version string using the format major .