'Write the file list in \'self.filelist\' (presumably as filled in
by \'add_defaults()\' and \'read_template()\') to the manifest file
named by \'self.manifest\'.'

def write_manifest(self):

    if (sys.version_info >= (3,)):
        files = []
        for file in self.filelist.files:
            try:
                file.encode('utf-8')
            except UnicodeEncodeError:
                log.warn(("'%s'    not    UTF-8    encodable    --    skipping" % file))
            else:
                files.append(file)
        self.filelist.files = files
    files = self.filelist.files
    if (os.sep != '/'):
        files = [f.replace(os.sep, '/') for f in files]
    self.execute(write_file, (self.manifest, files), ("writing    manifest    file    '%s'" % self.manifest))
