def _build_web(self, base_path, dist, target_path): cc.n('make Teleport Web package...') src_path = os.path.join(env.root_path, 'server', 'www') pkg_path = os.path.join(src_path, 'packages') tmp_path = os.path.join(base_path, '_tmp_web_') if os.path.exists(tmp_path): utils.remove(tmp_path) shutil.copytree(os.path.join(src_path, 'teleport'), os.path.join(tmp_path, 'teleport')) utils.remove(os.path.join(tmp_path, 'teleport', '.idea')) cc.n(' - copy packages...') utils.copy_ex(pkg_path, os.path.join(tmp_path, 'packages'), 'packages-common') utils.copy_ex( os.path.join(pkg_path, 'packages-{}'.format(dist)), os.path.join(tmp_path, 'packages', 'packages-{}'.format(dist)), ctx.bits_path) makepyo.remove_cache(tmp_path) shutil.copytree(tmp_path, os.path.join(target_path, 'www')) utils.remove(tmp_path)
def _build_web(self, base_path, dist, target_path): cc.n('make Teleport Web package...') src_path = os.path.join(env.root_path, 'server', 'www') pkg_path = os.path.join(src_path, 'packages') tmp_path = os.path.join(base_path, '_tmp_web_') if os.path.exists(tmp_path): utils.remove(tmp_path) shutil.copytree(os.path.join(src_path, 'teleport'), os.path.join(tmp_path, 'teleport')) utils.remove(os.path.join(tmp_path, 'teleport', '.idea')) cc.n(' - copy packages...') # utils.copy_ex(pkg_path, os.path.join(tmp_path, 'packages'), 'packages-common') utils.copy_ex(os.path.join(pkg_path, 'packages-{}'.format(dist)), os.path.join(tmp_path, 'packages', 'packages-{}'.format(dist)), ctx.bits_path) self._remove_py_cache(os.path.join(tmp_path, 'packages')) makepyo.remove_cache(tmp_path) shutil.copytree(tmp_path, os.path.join(target_path, 'www')) utils.remove(tmp_path)