servo: Merge #14381 - Move to Cargo workspaces (from servo:workspaces); r=SimonSapin

Source-Repo: https://github.com/servo/servo
Source-Revision: eb7032f6dd5e8a1f8c0602666805d1d10cc84e65
This commit is contained in:
Anthony Ramine
2016-11-28 01:44:40 -08:00
parent 0eca1b19e6
commit a5b9d525ce
9 changed files with 130 additions and 3812 deletions

View File

@@ -427,8 +427,6 @@ class CommandBase(object):
env["CARGO_HOME"] = self.config["tools"]["cargo-home-dir"]
env["CARGO_TARGET_DIR"] = path.join(self.context.topdir, "target")
if extra_lib:
if sys.platform == "darwin":
env["DYLD_LIBRARY_PATH"] = "%s%s%s" % \

View File

@@ -21,12 +21,6 @@ from mach.decorators import (
from servo.command_base import CommandBase, cd, call
CARGO_PATHS = [
path.join('ports', 'cef'),
path.join('ports', 'geckolib'),
path.join('ports', 'servo'),
]
@CommandProvider
class MachCommands(CommandBase):
@@ -89,11 +83,9 @@ class MachCommands(CommandBase):
self.ensure_bootstrapped()
for cargo_path in CARGO_PATHS:
with cd(cargo_path):
print(cargo_path)
call(["cargo", "update"] + params,
env=self.build_env())
with cd(self.context.topdir):
call(["cargo", "update"] + params,
env=self.build_env())
@Command('clippy',
description='Run Clippy',
@@ -165,10 +157,8 @@ class MachCommands(CommandBase):
self.ensure_bootstrapped()
# Fetch Cargo dependencies
for cargo_path in CARGO_PATHS:
with cd(cargo_path):
print(cargo_path)
call(["cargo", "fetch"], env=self.build_env())
with cd(self.context.topdir):
call(["cargo", "fetch"], env=self.build_env())
@Command('wptrunner-upgrade',
description='upgrade wptrunner.',

View File

@@ -359,6 +359,8 @@ def check_toml(file_name, lines):
raise StopIteration
ok_licensed = False
for idx, line in enumerate(lines):
if idx == 0 and "[workspace]" in line:
raise StopIteration
if line.find("*") != -1:
yield (idx + 1, "found asterisk instead of minimum version number")
for license_line in licenses_toml: