| 330 | |
| 331 | |
| 332 | def build_widget(arc_root): |
| 333 | js_dir = os.path.join(arc_root, 'catboost', 'python-package', 'catboost', 'widget', 'js') |
| 334 | subprocess.check_call('"{}" -m pip install -U jupyterlab'.format(sys.executable), shell=True, cwd=js_dir) |
| 335 | subprocess.check_call('yarn clean', shell=True, cwd=js_dir) |
| 336 | subprocess.check_call('yarn install', shell=True, cwd=js_dir) |
| 337 | subprocess.check_call('yarn build', shell=True, cwd=js_dir) |
| 338 | # workaround for https://github.com/yarnpkg/yarn/issues/6685 |
| 339 | for directory in glob.glob(os.path.join(tempfile.gettempdir(), 'yarn--*')): |
| 340 | shutil.rmtree(directory, ignore_errors=True) |
| 341 | |
| 342 | |
| 343 | def build(build_system, arc_root, out_root, tail_args, should_build_widget, should_build_with_cuda): |