def extract_dmg(self, path='<STR_LIT:.>'):
dmg_fd, dmg_fn = tempfile.mkstemp(prefix='<STR_LIT>', suffix='<STR_LIT>')<EOL>os.close(dmg_fd)<EOL>out_tmp = tempfile.mkdtemp(prefix='<STR_LIT>', suffix='<STR_LIT>')<EOL>try:<EOL><INDENT>_download_url(self.artifact_url('<STR_LIT>'), dmg_fn)<EOL>if std_platform.system() == '<STR_LIT>':<EOL><INDENT>LOG.info('<STR_LIT>')<EOL>subprocess.check_call(['<STR_LIT>', '<STR_LIT>', '<STR_LIT>', '<STR_LIT>', out_tmp, dmg_fn])<EOL>try:<EOL><INDENT>apps = [mt for mt in os.listdir(out_tmp) if mt.endswith('<STR_LIT>')]<EOL>assert len(apps) == <NUM_LIT:1><EOL>shutil.copytree(os.path.join(out_tmp, apps[<NUM_LIT:0>]), os.path.join(path, apps[<NUM_LIT:0>]), symlinks=True)<EOL><DEDENT>finally:<EOL><INDENT>subprocess.check_call(['<STR_LIT>', '<STR_LIT>', '<STR_LIT>', out_tmp])<EOL><DEDENT><DEDENT>else:<EOL><INDENT>LOG.warning('<STR_LIT>', std_platform.system())<EOL>shutil.copy(dmg_fn, os.path.join(path, '<STR_LIT>'))<EOL><DEDENT><DEDENT>finally:<EOL><INDENT>shutil.rmtree(out_tmp, onerror=onerror)<EOL>os.unlink(dmg_fn)<EOL><DEDENT>
Extract builds with .dmg extension

Will only work if `hdiutil` is available.

@type path:
@param path: