aboutsummaryrefslogtreecommitdiffstats
path: root/components
diff options
context:
space:
mode:
authorbors-servo <lbergstrom+bors@mozilla.com>2016-07-08 11:14:48 -0700
committerGitHub <noreply@github.com>2016-07-08 11:14:48 -0700
commit35a23bfef394fe451879f09979167b048a7bdc88 (patch)
tree7bc826ea658673d9ee6f1ad007dff8c74126f690 /components
parent12260b24d0e97ee33116d4b730203e5a2619a499 (diff)
parent6519d06b235858376c16807cee579171b77e3535 (diff)
downloadservo-35a23bfef394fe451879f09979167b048a7bdc88.tar.gz
servo-35a23bfef394fe451879f09979167b048a7bdc88.zip
Auto merge of #12338 - upsuper:win-geckolib-fix, r=bholley
Fix geckolib build for Windows It contains several fixes to make `./mach build-geckolib` work on Windows. <!-- Reviewable:start --> --- This change is [<img src="https://reviewable.io/review_button.svg" height="34" align="absmiddle" alt="Reviewable"/>](https://reviewable.io/reviews/servo/servo/12338) <!-- Reviewable:end -->
Diffstat (limited to 'components')
-rw-r--r--components/style/build.rs7
-rw-r--r--components/style/properties/build.py2
2 files changed, 7 insertions, 2 deletions
diff --git a/components/style/build.rs b/components/style/build.rs
index 0f824c498c8..23ee9d55e07 100644
--- a/components/style/build.rs
+++ b/components/style/build.rs
@@ -11,6 +11,10 @@ use walkdir::WalkDir;
#[cfg(windows)]
fn find_python() -> String {
+ if Command::new("python2.7.exe").arg("--version").output().is_ok() {
+ return "python2.7.exe".to_owned();
+ }
+
if Command::new("python27.exe").arg("--version").output().is_ok() {
return "python27.exe".to_owned();
}
@@ -19,7 +23,8 @@ fn find_python() -> String {
return "python.exe".to_owned();
}
- panic!("Can't find python (tried python27.exe and python.exe)! Try fixing PATH or setting the PYTHON env var");
+ panic!(concat!("Can't find python (tried python2.7.exe, python27.exe, and python.exe)! ",
+ "Try fixing PATH or setting the PYTHON env var"));
}
#[cfg(not(windows))]
diff --git a/components/style/properties/build.py b/components/style/properties/build.py
index 28a9b59019f..eeb78817f3f 100644
--- a/components/style/properties/build.py
+++ b/components/style/properties/build.py
@@ -6,7 +6,7 @@ import json
import os.path
import sys
-BASE = os.path.dirname(__file__)
+BASE = os.path.dirname(__file__.replace('\\', '/'))
sys.path.insert(0, os.path.join(BASE, "Mako-0.9.1.zip"))
sys.path.insert(0, BASE) # For importing `data.py`