diff --git a/components/style/build.rs b/components/style/build.rs index 46270c02112..f470f5b4079 100644 --- a/components/style/build.rs +++ b/components/style/build.rs @@ -3,6 +3,7 @@ * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ use std::env; +use std::path::Path; use std::process::{Command, exit}; #[cfg(windows)] @@ -29,9 +30,12 @@ fn find_python() -> String { fn main() { let python = env::var("PYTHON").ok().unwrap_or_else(find_python); + let script = Path::new(file!()).parent().unwrap().join("properties").join("build.py"); let product = if cfg!(feature = "gecko") { "gecko" } else { "servo" }; let status = Command::new(python) - .args(&["generate_properties_rs.py", product, "rust"]) + .arg(&script) + .arg(product) + .arg("rust") .status() .unwrap(); if !status.success() { diff --git a/components/style/Mako-0.9.1.zip b/components/style/properties/Mako-0.9.1.zip similarity index 100% rename from components/style/Mako-0.9.1.zip rename to components/style/properties/Mako-0.9.1.zip diff --git a/components/style/generate_properties_rs.py b/components/style/properties/build.py similarity index 96% rename from components/style/generate_properties_rs.py rename to components/style/properties/build.py index 48fa0298a37..ffc72a678d5 100644 --- a/components/style/generate_properties_rs.py +++ b/components/style/properties/build.py @@ -59,7 +59,7 @@ def write_html(template): ) _, html = render("properties.html.mako", properties=properties) - doc_servo = os.path.join(BASE, "..", "..", "target", "doc", "servo") + doc_servo = os.path.join(BASE, "..", "..", "..", "target", "doc", "servo") write(doc_servo, "css-properties.json", json.dumps(properties, indent=4)) write(doc_servo, "css-properties.html", html) diff --git a/components/style/properties.html.mako b/components/style/properties/properties.html.mako similarity index 100% rename from components/style/properties.html.mako rename to components/style/properties/properties.html.mako diff --git a/components/style/properties.mako.rs b/components/style/properties/properties.mako.rs similarity index 100% rename from components/style/properties.mako.rs rename to components/style/properties/properties.mako.rs diff --git a/etc/ci/upload_docs.sh b/etc/ci/upload_docs.sh index 6141e3cb599..aac1374ceda 100755 --- a/etc/ci/upload_docs.sh +++ b/etc/ci/upload_docs.sh @@ -12,7 +12,7 @@ cd "$(dirname $0)/../.." # etc/doc.servo.org/index.html overwrites $(mach rust-root)/doc/index.html cp etc/doc.servo.org/* target/doc/ -python components/style/build_properties_rs.py servo html +python components/style/properties/build.py servo html ghp-import -n target/doc git push -qf https://${TOKEN}@github.com/servo/doc.servo.org.git gh-pages diff --git a/ports/geckolib/build.rs b/ports/geckolib/build.rs index 0e19e988884..e7bae9ee508 100644 --- a/ports/geckolib/build.rs +++ b/ports/geckolib/build.rs @@ -41,9 +41,9 @@ fn main() { let geckolib_dir = Path::new(file!()).parent().unwrap(); let top_dir = geckolib_dir.join("..").join(".."); - let style_template = Path::new("components/style/properties.mako.rs"); + let style_template = Path::new("components/style/properties/properties.mako.rs"); let geckolib_template = Path::new("ports/geckolib/properties.mako.rs"); - let mako = Path::new("components/style/Mako-0.9.1.zip"); + let mako = Path::new("components/style/properties/Mako-0.9.1.zip"); let result = Command::new(python) .current_dir(top_dir) diff --git a/python/servo/testing_commands.py b/python/servo/testing_commands.py index ef5d59c0d3d..9e20fab1c79 100644 --- a/python/servo/testing_commands.py +++ b/python/servo/testing_commands.py @@ -666,7 +666,7 @@ def check_css_properties_json(topdir): os.remove(filename) subprocess.check_call([ sys.executable, - path.join(topdir, "components", "style", "build_properties_rs.py"), + path.join(topdir, "components", "style", "properties", "build.py"), "servo", "html", ])