diff options
author | Vladimir Vukicevic <vladimir@pobox.com> | 2015-09-22 15:09:54 -0400 |
---|---|---|
committer | Lars Bergstrom <lars@lars.com> | 2016-01-20 08:38:24 -0600 |
commit | ee863fde5993f0f7bae2acf06e1fae21bd459c88 (patch) | |
tree | 452fbf59927fee6339756c973cf8ca3074211463 /python/servo/bootstrap_commands.py | |
parent | 77aea599c76278d7efd92efbdae8392d7e93a832 (diff) | |
download | servo-ee863fde5993f0f7bae2acf06e1fae21bd459c88.tar.gz servo-ee863fde5993f0f7bae2acf06e1fae21bd459c88.zip |
win32: mach and build command fixes
- Add SERVO_USE_NIGHTLY_RUST env var to use the latest rust/cargo nightly snapshot
- Fix up looking for cargo binary (in cargo/bin/cargo, not bin/cargo)
- Fix up win32 executable checking (use .exe suffix)
- fix up win32 PATH handling (subprocess must use shell=True for PATH change to be honored)
Diffstat (limited to 'python/servo/bootstrap_commands.py')
-rw-r--r-- | python/servo/bootstrap_commands.py | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/python/servo/bootstrap_commands.py b/python/servo/bootstrap_commands.py index 147f63e71d0..9959c14ed11 100644 --- a/python/servo/bootstrap_commands.py +++ b/python/servo/bootstrap_commands.py @@ -28,7 +28,7 @@ from mach.decorators import ( Command, ) -from servo.command_base import CommandBase, cd, host_triple +from servo.command_base import CommandBase, cd, host_triple, use_nightly_rust, check_call, BIN_SUFFIX def download(desc, src, writer): @@ -111,7 +111,7 @@ class MachCommands(CommandBase): def bootstrap_rustc(self, force=False): rust_dir = path.join( self.context.sharedir, "rust", self.rust_path()) - if not force and path.exists(path.join(rust_dir, "rustc", "bin", "rustc")): + if not force and path.exists(path.join(rust_dir, "rustc", "bin", "rustc" + BIN_SUFFIX)): print("Rust compiler already downloaded.", end=" ") print("Use |bootstrap-rust --force| to download again.") return @@ -203,7 +203,7 @@ class MachCommands(CommandBase): def bootstrap_cargo(self, force=False): cargo_dir = path.join(self.context.sharedir, "cargo", self.cargo_build_id()) - if not force and path.exists(path.join(cargo_dir, "bin", "cargo")): + if not force and path.exists(path.join(cargo_dir, "cargo", "bin", "cargo" + BIN_SUFFIX)): print("Cargo already downloaded.", end=" ") print("Use |bootstrap-cargo --force| to download again.") return @@ -289,9 +289,9 @@ class MachCommands(CommandBase): % module_path) print("\nClean the submodule and try again.") return 1 - subprocess.check_call( + check_call( ["git", "submodule", "--quiet", "sync", "--recursive"]) - subprocess.check_call( + check_call( ["git", "submodule", "update", "--init", "--recursive"]) @Command('clean-nightlies', |