diff options
| author | robbym <robbymadruga@gmail.com> | 2018-07-18 17:00:53 -0700 |
|---|---|---|
| committer | Ryan Dahl <ry@tinyclouds.org> | 2018-07-18 20:00:53 -0400 |
| commit | d93bd4b127c39e2f0e8d2ec3bbec3f7c118890f4 (patch) | |
| tree | 255c5de8aefa80b4108ef534476a2e10bdd166c4 /tools | |
| parent | 3dde880c328c2bf51334f014fdaf772cfed7e8ea (diff) | |
Use Cargo to install rust deps into //third_party/rust_crates (#383)
Diffstat (limited to 'tools')
| -rwxr-xr-x | tools/build_third_party.py | 2 | ||||
| -rw-r--r-- | tools/util.py | 4 |
2 files changed, 5 insertions, 1 deletions
diff --git a/tools/build_third_party.py b/tools/build_third_party.py index d1ae16ccf..e46c8ddd1 100755 --- a/tools/build_third_party.py +++ b/tools/build_third_party.py @@ -29,3 +29,5 @@ remove_and_symlink(join("v8", "third_party", "llvm-build"), "llvm-build") remove_and_symlink(join("v8", "third_party", "markupsafe"), "markupsafe") run(["gclient", "sync", "--shallow", "--no-history"]) run(["yarn"]) +run(["cargo", "fetch", "--manifest-path=../Cargo.toml"], + envs={'CARGO_HOME': third_party_path + '/rust_crates'}) diff --git a/tools/util.py b/tools/util.py index 6874f8000..8b8628aba 100644 --- a/tools/util.py +++ b/tools/util.py @@ -4,10 +4,12 @@ import os import subprocess -def run(args, quiet=False): +def run(args, quiet=False, envs={}): if not quiet: print " ".join(args) env = os.environ.copy() + for key in envs.keys(): + env[key] = envs[key] if os.name == "nt": # Run through shell to make .bat/.cmd files work. args = ["cmd", "/c"] + args |
