parameters: (self)
docstring: Build the bundle.
docstring_summary: Build the bundle.
docstring_tokens: Build the bundle .
function: def build(self):
          """Build the bundle."""
          builddir = self.builddir
          if builddir and not os.path.exists(builddir):
              os.mkdir(builddir)
          self.message("Building %s" % repr(self.bundlepath), 1)
          if os.path.exists(self.bundlepath):
              shutil.rmtree(self.bundlepath)
          if os.path.exists(self.bundlepath + '~'):
              shutil.rmtree(self.bundlepath + '~')
          bp = self.bundlepath
  
          # Create the app bundle in a temporary location and then
          # rename the completed bundle. This way the Finder will
          # never see an incomplete bundle (where it might pick up
          # and cache the wrong meta data)
          self.bundlepath = bp + '~'
          try:
              os.mkdir(self.bundlepath)
              self.preProcess()
              self._copyFiles()
              self._addMetaFiles()
              self.postProcess()
              os.rename(self.bundlepath, bp)
          finally:
              self.bundlepath = bp
          self.message("Done.", 1)
function_tokens: def build ( self ) : builddir = self . builddir if builddir and not os . path . exists ( builddir ) : os . mkdir ( builddir ) self . message ( "Building %s" % repr ( self . bundlepath ) , 1 ) if os . path . exists ( self . bundlepath ) : shutil . rmtree ( self . bundlepath ) if os . path . exists ( self . bundlepath + '~' ) : shutil . rmtree ( self . bundlepath + '~' ) bp = self . bundlepath # Create the app bundle in a temporary location and then # rename the completed bundle. This way the Finder will # never see an incomplete bundle (where it might pick up # and cache the wrong meta data) self . bundlepath = bp + '~' try : os . mkdir ( self . bundlepath ) self . preProcess ( ) self . _copyFiles ( ) self . _addMetaFiles ( ) self . postProcess ( ) os . rename ( self . bundlepath , bp ) finally : self . bundlepath = bp self . message ( "Done." , 1 )