docs: def generateSetupFile(self, outpath='.', egg=False):
          """
          Generates the setup file for this builder.
          """
          outpath = os.path.abspath(outpath)
          outfile = os.path.join(outpath, 'setup.py')
  
          opts = {
              'name': self.name(),
              'distname': self.distributionName(),
              'version': self.version(),
              'author': self.author(),
              'author_email': self.authorEmail(),
              'keywords': self.keywords(),
              'license': self.license(),
              'brief': self.brief(),
              'description': self.description(),
              'url': self.companyUrl()
          }
  
          wrap_dict = lambda x: map(lambda k: "r'{0}': [{1}]".format(k[0],
                                                                     ',\n'.join(wrap_str(k[1]))),
                                    x.items())
  
          opts['dependencies'] = ',\n'.join(wrap_str(self.dependencies()))
          opts['classifiers'] = ',\n'.join(wrap_str(self.classifiers()))
  
          if os.path.isfile(self.sourcePath()):
              basepath = os.path.normpath(os.path.dirname(self.sourcePath()))
          else:
              basepath = os.path.normpath(self.sourcePath())
  
          self.generatePlugins(basepath)
  
          exts = set()
          for root, folders, files in os.walk(basepath):
              for file_ in files:
                  _, ext = os.path.splitext(file_)
                  if ext not in ('.py', '.pyc', '.pyo'):
                      exts.add('*' + ext)
  
          exts = list(exts)
          text = templ.SETUPFILE.format(**opts)
  
          # generate the file
          if not os.path.exists(outfile):
              f = open(outfile, 'w')
              f.write(text)
              f.close()
  
          # generate the manifest file
          manfile = os.path.join(outpath, 'MANIFEST.in')
          if not os.path.exists(manfile):
              f = open(manfile, 'w')
              f.write('include *.md *.txt *.ini *.cfg *.rst\n')
              f.write('recursive-include {0} {1}\n'.format(self.name(), ' '.join(exts)))
              f.close()
  
          # generate the egg
          if egg:
              cmd = 'cd {0} && $PYTHON setup.py bdist_egg'.format(outpath)
              cmd = os.path.expandvars(cmd)
              cmdexec(cmd)