code: def create_conf_file (self, data, directory=None):
          
          data.insert(0, "# this file is automatically created by setup.py")
          data.insert(0, "# -*- coding: iso-8859-1 -*-")
          if directory is None:
              directory = os.getcwd()
          filename = self.get_conf_filename(directory)
          # add metadata
          metanames = ("name", "version", "author", "author_email",
                       "maintainer", "maintainer_email", "url",
                       "license", "description", "long_description",
                       "keywords", "platforms", "fullname", "contact",
                       "contact_email")
          for name in metanames:
              method = "get_" + name
              val = getattr(self.metadata, method)()
              if isinstance(val, str):
                  val = unicode(val)
              cmd = "%s = %r" % (name, val)
              data.append(cmd)
          data.append('release_date = "%s"' % get_release_date())
          data.append('portable = %s' % get_portable())
          # write the config file
          util.execute(write_file, (filename, data),
                       "creating %s" % filename, self.verbose >= 1, self.dry_run)
docs: Create local config file from given data (list of lines) in
          the directory (or current directory if not given).