Auto merge of #26413 - servo:jdm-patch-41, r=asajeffrey

Use PYTHON2 variable for script's codegen.

This makes the python2 dependency a bit more explicit.
This commit is contained in:
bors-servo 2020-05-04 15:22:58 -04:00 committed by GitHub
commit d1b7b756a7
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -65,7 +65,7 @@ impl<'a> phf_shared::PhfHash for Bytes<'a> {
}
fn find_python() -> String {
env::var("PYTHON").ok().unwrap_or_else(|| {
env::var("PYTHON2").ok().unwrap_or_else(|| {
let candidates = if cfg!(windows) {
["python2.7.exe", "python27.exe", "python.exe"]
} else {
@ -82,7 +82,7 @@ fn find_python() -> String {
}
}
panic!(
"Can't find python (tried {})! Try fixing PATH or setting the PYTHON env var",
"Can't find python (tried {})! Try fixing PATH or setting the PYTHON2 env var",
candidates.join(", ")
)
})