def buildDMG():
 outdir = os.path.join(WORKDIR, 'diskimage')
 if os.path.exists(outdir):
  shutil.rmtree(outdir)
 imagepath = os.path.join(outdir, ('python-%s-macosx' % (getFullVersion(),)))
 if INCLUDE_TIMESTAMP:
  imagepath = (imagepath + ('%04d-%02d-%02d' % time.localtime()[:3]))
 imagepath = (imagepath + '.dmg')
 os.mkdir(outdir)
 runCommand(("hdiutil create -volname 'Universal MacPython %s' -srcfolder %s %s" % (getFullVersion(), shellQuote(os.path.join(WORKDIR, 'installer')), shellQuote(imagepath))))
 return imagepath

def buildDMG ( ) : outdir = os . path . join ( WORKDIR , 'diskimage' ) if os . path . exists ( outdir ) : shutil . rmtree ( outdir ) imagepath = os . path . join ( outdir , ( 'python-%s-macosx' % ( getFullVersion ( ) , ) ) ) if INCLUDE_TIMESTAMP : imagepath = ( imagepath + ( '%04d-%02d-%02d' % time . localtime ( ) [ : 3 ] ) ) imagepath = ( imagepath + '.dmg' ) os . mkdir ( outdir ) runCommand ( ( "hdiutil create -volname 'Universal MacPython %s' -srcfolder %s %s" % ( getFullVersion ( ) , shellQuote ( os . path . join ( WORKDIR , 'installer' ) ) , shellQuote ( imagepath ) ) ) ) return imagepath
create dmg containing the rootdir .