mirror of
https://github.com/servo/servo.git
synced 2025-08-06 22:15:33 +01:00
Move Mako-related files into a new sub-directory.
There’s gonna be more of them.
This commit is contained in:
parent
b7eb720c74
commit
7787b21e30
8 changed files with 10 additions and 6 deletions
|
@ -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() {
|
||||
|
|
|
@ -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)
|
||||
|
Loading…
Add table
Add a link
Reference in a new issue