aboutsummaryrefslogtreecommitdiffstats
path: root/python/servo/devenv_commands.py
diff options
context:
space:
mode:
authorJack Moffitt <jack@metajack.im>2014-08-28 09:34:23 -0600
committerJack Moffitt <jack@metajack.im>2014-09-08 20:21:42 -0600
commitc6ab60dbfc6da7b4f800c9e40893c8b58413960c (patch)
treed1d74076cf7fa20e4f77ec7cb82cae98b67362cb /python/servo/devenv_commands.py
parentdb2f642c32fc5bed445bb6f2e45b0f6f0b4342cf (diff)
downloadservo-c6ab60dbfc6da7b4f800c9e40893c8b58413960c.tar.gz
servo-c6ab60dbfc6da7b4f800c9e40893c8b58413960c.zip
Cargoify servo
Diffstat (limited to 'python/servo/devenv_commands.py')
-rw-r--r--python/servo/devenv_commands.py32
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())