From 39fff93befc7d728deda44aa120490589a52ba2e Mon Sep 17 00:00:00 2001 From: Josh Matthews Date: Mon, 4 May 2020 11:52:22 -0400 Subject: [PATCH 1/2] Use PYTHON2 variable for script's codegen. --- components/script/build.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/components/script/build.rs b/components/script/build.rs index d8d65b098db..a931c9ac5ef 100644 --- a/components/script/build.rs +++ b/components/script/build.rs @@ -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 { From 0148cc5cf90bf26c32c6481b13120664e5bc50a4 Mon Sep 17 00:00:00 2001 From: Josh Matthews Date: Mon, 4 May 2020 11:52:49 -0400 Subject: [PATCH 2/2] Update error message. --- components/script/build.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/components/script/build.rs b/components/script/build.rs index a931c9ac5ef..6a9b4866759 100644 --- a/components/script/build.rs +++ b/components/script/build.rs @@ -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(", ") ) })