aboutsummaryrefslogtreecommitdiffstats
path: root/python
diff options
context:
space:
mode:
Diffstat (limited to 'python')
-rw-r--r--python/servo/bootstrap_commands.py6
-rw-r--r--python/servo/build_commands.py4
-rw-r--r--python/servo/command_base.py14
-rw-r--r--python/servo/post_build_commands.py2
-rw-r--r--python/servo/testing_commands.py4
5 files changed, 18 insertions, 12 deletions
diff --git a/python/servo/bootstrap_commands.py b/python/servo/bootstrap_commands.py
index 68edbdd38c8..b59b7fed929 100644
--- a/python/servo/bootstrap_commands.py
+++ b/python/servo/bootstrap_commands.py
@@ -79,7 +79,7 @@ class MachCommands(CommandBase):
def bootstrap_rustc(self, force=False):
rust_dir = path.join(
self.context.sharedir, "rust", *self.rust_snapshot_path().split("/"))
- if not force and path.exists(path.join(rust_dir, "bin", "rustc")):
+ if not force and path.exists(path.join(rust_dir, "rustc", "bin", "rustc")):
print("Snapshot Rust compiler already downloaded.", end=" ")
print("Use |bootstrap-rust --force| to download again.")
return
@@ -130,7 +130,9 @@ class MachCommands(CommandBase):
if path.isdir(temp_dir):
shutil.rmtree(temp_dir)
extract(tgz_file, temp_dir)
- shutil.move(path.join(temp_dir, docs_name.split("/")[1], "share", "doc", "rust", "html"), docs_dir)
+ shutil.move(path.join(temp_dir, docs_name.split("/")[1],
+ "rust-docs", "share", "doc", "rust", "html"),
+ docs_dir)
shutil.rmtree(temp_dir)
print("Rust docs ready.")
diff --git a/python/servo/build_commands.py b/python/servo/build_commands.py
index e4327d64b9e..ad8e58d04c2 100644
--- a/python/servo/build_commands.py
+++ b/python/servo/build_commands.py
@@ -93,7 +93,9 @@ class MachCommands(CommandBase):
status = subprocess.call(
make_cmd + ["-f", "openssl.makefile"],
env=self.build_env())
- env['OPENSSL_PATH'] = path.join(self.android_support_dir(), "openssl-1.0.1k")
+ openssl_dir = path.join(self.android_support_dir(), "openssl-1.0.1k")
+ env['OPENSSL_LIB_DIR'] = openssl_dir
+ env['OPENSSL_INCLUDE_DIR'] = path.join(openssl_dir, "include")
status = subprocess.call(
["cargo", "build"] + opts,
diff --git a/python/servo/command_base.py b/python/servo/command_base.py
index 5075cad6487..25ed18bb29a 100644
--- a/python/servo/command_base.py
+++ b/python/servo/command_base.py
@@ -128,12 +128,12 @@ class CommandBase(object):
if not self.config["tools"]["system-rust"] \
or self.config["tools"]["rust-root"]:
env["RUST_ROOT"] = self.config["tools"]["rust-root"]
- extra_path += [path.join(self.config["tools"]["rust-root"], "bin")]
- extra_lib += [path.join(self.config["tools"]["rust-root"], "lib")]
+ extra_path += [path.join(self.config["tools"]["rust-root"], "rustc", "bin")]
+ extra_lib += [path.join(self.config["tools"]["rust-root"], "rustc", "lib")]
if not self.config["tools"]["system-cargo"] \
or self.config["tools"]["cargo-root"]:
extra_path += [
- path.join(self.config["tools"]["cargo-root"], "bin")]
+ path.join(self.config["tools"]["cargo-root"], "cargo", "bin")]
if extra_path:
env["PATH"] = "%s%s%s" % (
@@ -192,7 +192,9 @@ class CommandBase(object):
"--sysroot=%(gonkdir)s/out/target/product/%(gonkproduct)s/obj/") % {"gonkdir": env["GONKDIR"], "gonkproduct": env["GONK_PRODUCT"] }
# Not strictly necessary for a vanilla build, but might be when tweaking the openssl build
- env["OPENSSL_PATH"] = "%(gonkdir)s/out/target/product/%(gonkproduct)s/obj/lib" % {"gonkdir": env["GONKDIR"], "gonkproduct": env["GONK_PRODUCT"] }
+ openssl_dir = "%(gonkdir)s/out/target/product/%(gonkproduct)s/obj/lib" % {"gonkdir": env["GONKDIR"], "gonkproduct": env["GONK_PRODUCT"] }
+ env["OPENSSL_LIB_DIR"] = openssl_dir
+ env['OPENSSL_INCLUDE_DIR'] = path.join(openssl_dir, "include")
# FIXME: These are set because they are the variable names that
# android-rs-glue expects. However, other submodules have makefiles that
@@ -233,11 +235,11 @@ class CommandBase(object):
if not self.config["tools"]["system-rust"] and \
not path.exists(path.join(
- self.config["tools"]["rust-root"], "bin", "rustc")):
+ self.config["tools"]["rust-root"], "rustc", "bin", "rustc")):
Registrar.dispatch("bootstrap-rust", context=self.context)
if not self.config["tools"]["system-cargo"] and \
not path.exists(path.join(
- self.config["tools"]["cargo-root"], "bin", "cargo")):
+ self.config["tools"]["cargo-root"], "cargo", "bin", "cargo")):
Registrar.dispatch("bootstrap-cargo", context=self.context)
self.context.bootstrapped = True
diff --git a/python/servo/post_build_commands.py b/python/servo/post_build_commands.py
index dc7da708a0d..7faf3a598cf 100644
--- a/python/servo/post_build_commands.py
+++ b/python/servo/post_build_commands.py
@@ -35,7 +35,7 @@ class MachCommands(CommandBase):
def get_binary_path(self, release, dev):
base_path = path.join("components", "servo", "target")
release_path = path.join(base_path, "release", "servo")
- dev_path = path.join(base_path, "servo")
+ dev_path = path.join(base_path, "debug", "servo")
# Prefer release if both given
if release and dev:
diff --git a/python/servo/testing_commands.py b/python/servo/testing_commands.py
index ac70aee373d..2bd4fcdad7f 100644
--- a/python/servo/testing_commands.py
+++ b/python/servo/testing_commands.py
@@ -36,12 +36,12 @@ class MachCommands(CommandBase):
def find_test(self, prefix):
target_contents = os.listdir(path.join(
- self.context.topdir, "components", "servo", "target"))
+ self.context.topdir, "components", "servo", "target", "debug"))
for filename in target_contents:
if filename.startswith(prefix + "-"):
filepath = path.join(
self.context.topdir, "components", "servo",
- "target", filename)
+ "target", "debug", filename)
if path.isfile(filepath) and os.access(filepath, os.X_OK):
return filepath