diff options
Diffstat (limited to 'python/servo/devenv_commands.py')
-rw-r--r-- | python/servo/devenv_commands.py | 32 |
1 files changed, 32 insertions, 0 deletions
diff --git a/python/servo/devenv_commands.py b/python/servo/devenv_commands.py new file mode 100644 index 00000000000..1c5c8ee24b5 --- /dev/null +++ b/python/servo/devenv_commands.py @@ -0,0 +1,32 @@ +from __future__ import print_function, unicode_literals + +import json +import os +import os.path as path +import shutil +import subprocess +import sys +import tarfile +from time import time +import urllib + +from mach.registrar import Registrar +from mach.decorators import ( + CommandArgument, + CommandProvider, + Command, +) + +from servo.command_base import CommandBase + +@CommandProvider +class MachCommands(CommandBase): + @Command('cargo', + description='Run Cargo', + category='devenv', + allow_all_args=True) + @CommandArgument('params', default=None, nargs='...', + help="Command-line arguments to be passed through to Cervo") + def run(self, params): + return subprocess.call(["cargo"] + params, + env=self.build_env()) |