code: def build_license_file(directory, spec):
      
      name, text = '', ''
  
      try:
          name = spec['LICENSE']
          text = spec['X_MSI_LICENSE_TEXT']
      except KeyError:
          pass # ignore this as X_MSI_LICENSE_TEXT is optional
  
      if name!='' or text!='':
          file = open( os.path.join(directory.get_path(), 'License.rtf'), 'w' )
          file.write('{\\rtf')
          if text!='':
               file.write(text.replace('\n', '\\par '))
          else:
               file.write(name+'\\par\\par')
          file.write('}')
          file.close()
docs: Creates a License.rtf file with the content of "X_MSI_LICENSE_TEXT"
      in the given directory