def add_suffix_to_extensions(toc):
 from .datastruct import TOC
 new_toc = TOC()
 for (inm, fnm, typ) in toc:
  if (typ == 'EXTENSION'):
   if (os.path.splitext(inm)[1] not in EXTENSION_SUFFIXES):
    inm = (inm + os.path.splitext(fnm)[1])
  elif (typ == 'DEPENDENCY'):
   binext = os.path.splitext(fnm)[1]
   if (not (os.path.splitext(inm)[1] == binext)):
    inm = (inm + binext)
  new_toc.append((inm, fnm, typ))
 return new_toc

def add_suffix_to_extensions ( toc ) : from . datastruct import TOC new_toc = TOC ( ) for ( inm , fnm , typ ) in toc : if ( typ == 'EXTENSION' ) : if ( os . path . splitext ( inm ) [ 1 ] not in EXTENSION_SUFFIXES ) : inm = ( inm + os . path . splitext ( fnm ) [ 1 ] ) elif ( typ == 'DEPENDENCY' ) : binext = os . path . splitext ( fnm ) [ 1 ] if ( not ( os . path . splitext ( inm ) [ 1 ] == binext ) ) : inm = ( inm + binext ) new_toc . append ( ( inm , fnm , typ ) ) return new_toc
returns a new toc with proper library suffix for extension items .