parameters: (self, root, resources=None, **options)
docstring: Create a package for some given root folder.
  
          With no 'resources' argument set it is assumed to be the same
          as the root directory. Option items replace the default ones
          in the package info.
docstring_summary: Create a package for some given root folder.
docstring_tokens: Create a package for some given root folder .
function: def build(self, root, resources=None, **options):
          """Create a package for some given root folder.
  
          With no 'resources' argument set it is assumed to be the same
          as the root directory. Option items replace the default ones
          in the package info.
          """
  
          # set folder attributes
          self.sourceFolder = root
          if resources is None:
              self.resourceFolder = root
          else:
              self.resourceFolder = resources
  
          # replace default option settings with user ones if provided
          fields = self. packageInfoDefaults.keys()
          for k, v in options.items():
              if k in fields:
                  self.packageInfo[k] = v
              elif not k in ["OutputDir"]:
                  raise Error, "Unknown package option: %s" % k
  
          # Check where we should leave the output. Default is current directory
          outputdir = options.get("OutputDir", os.getcwd())
          packageName = self.packageInfo["Title"]
          self.PackageRootFolder = os.path.join(outputdir, packageName + ".pkg")
  
          # do what needs to be done
          self._makeFolders()
          self._addInfo()
          self._addBom()
          self._addArchive()
          self._addResources()
          self._addSizes()
          self._addLoc()
function_tokens: def build ( self , root , resources = None , * * options ) : # set folder attributes self . sourceFolder = root if resources is None : self . resourceFolder = root else : self . resourceFolder = resources # replace default option settings with user ones if provided fields = self . packageInfoDefaults . keys ( ) for k , v in options . items ( ) : if k in fields : self . packageInfo [ k ] = v elif not k in [ "OutputDir" ] : raise Error , "Unknown package option: %s" % k # Check where we should leave the output. Default is current directory outputdir = options . get ( "OutputDir" , os . getcwd ( ) ) packageName = self . packageInfo [ "Title" ] self . PackageRootFolder = os . path . join ( outputdir , packageName + ".pkg" ) # do what needs to be done self . _makeFolders ( ) self . _addInfo ( ) self . _addBom ( ) self . _addArchive ( ) self . _addResources ( ) self . _addSizes ( ) self . _addLoc ( )