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)
This commit is contained in:
Vladimir Vukicevic 2015-09-22 15:09:54 -04:00 committed by Lars Bergstrom
parent 77aea599c7
commit ee863fde59
6 changed files with 74 additions and 49 deletions

View file

@ -11,7 +11,6 @@ from __future__ import print_function, unicode_literals
import os
import os.path as path
import subprocess
import sys
import shutil
@ -23,7 +22,7 @@ from mach.decorators import (
Command,
)
from servo.command_base import CommandBase, cd
from servo.command_base import CommandBase, cd, call
def is_headless_build():
@ -123,14 +122,6 @@ def notify(title, text):
print("[Warning] Could not generate notification! %s" % extra, file=sys.stderr)
def call(*args, **kwargs):
"""Wrap `subprocess.call`, printing the command if verbose=True."""
verbose = kwargs.pop('verbose', False)
if verbose:
print(' '.join(args[0]))
return subprocess.call(*args, **kwargs)
@CommandProvider
class MachCommands(CommandBase):
@Command('build',