def _get_distset(tgt):
 tgtattrs = tgt.split('-')
 if (tgtattrs[0] == 'amzn'):
  distset = '--define "dist .{0}1"'.format(tgtattrs[0])
 elif (tgtattrs[1] in ['5', '6', '7']):
  distset = '--define "dist .el{0}"'.format(tgtattrs[1])
 else:
  distset = ''
 return distset

def _get_distset ( tgt ) : tgtattrs = tgt . split ( '-' ) if ( tgtattrs [ 0 ] == 'amzn' ) : distset = '--define "dist .{0}1"' . format ( tgtattrs [ 0 ] ) elif ( tgtattrs [ 1 ] in [ '5' , '6' , '7' ] ) : distset = '--define "dist .el{0}"' . format ( tgtattrs [ 1 ] ) else : distset = '' return distset
get the distribution string for use with rpmbuild and mock .