2018-07-04 09:04:59 -04:00
|
|
|
#!/usr/bin/env python
|
2018-07-08 02:18:14 -04:00
|
|
|
# This script generates the third party dependencies of deno.
|
2018-07-04 09:04:59 -04:00
|
|
|
# - Get Depot Tools and make sure it's in your path.
|
|
|
|
# http://commondatastorage.googleapis.com/chrome-infra-docs/flat/depot_tools/docs/html/depot_tools_tutorial.html#_setting_up
|
|
|
|
# - You need yarn installed as well.
|
|
|
|
# https://yarnpkg.com/lang/en/docs/install/
|
|
|
|
# Use //gclient_config.py to modify the git deps.
|
|
|
|
# Use //js/package.json to modify the npm deps.
|
|
|
|
|
|
|
|
import os
|
2018-07-08 02:18:14 -04:00
|
|
|
from os.path import join
|
2018-07-04 09:04:59 -04:00
|
|
|
import subprocess
|
2018-07-08 02:24:29 -04:00
|
|
|
from util import run, remove_and_symlink
|
2018-07-04 09:04:59 -04:00
|
|
|
|
|
|
|
root_path = os.path.dirname(os.path.dirname(os.path.realpath(__file__)))
|
2018-07-08 02:18:14 -04:00
|
|
|
third_party_path = join(root_path, "third_party")
|
2018-07-04 09:04:59 -04:00
|
|
|
|
2018-07-08 02:24:29 -04:00
|
|
|
try:
|
|
|
|
os.makedirs(third_party_path)
|
|
|
|
except:
|
|
|
|
pass
|
|
|
|
os.chdir(third_party_path)
|
|
|
|
remove_and_symlink(join("..", "gclient_config.py"), ".gclient")
|
|
|
|
remove_and_symlink(join("..", "package.json"), "package.json")
|
|
|
|
remove_and_symlink(join("..", "yarn.lock"), "yarn.lock")
|
|
|
|
remove_and_symlink(join("v8", "third_party", "googletest"), "googletest")
|
|
|
|
remove_and_symlink(join("v8", "third_party", "jinja2"), "jinja2")
|
|
|
|
remove_and_symlink(join("v8", "third_party", "llvm-build"), "llvm-build")
|
|
|
|
remove_and_symlink(join("v8", "third_party", "markupsafe"), "markupsafe")
|
|
|
|
run(["gclient", "sync", "--no-history"])
|
|
|
|
run(["yarn"])
|