From b1b507c54bca7fa5723c94db342a17062754d81f Mon Sep 17 00:00:00 2001 From: Matthew Leibowitz Date: Thu, 24 Aug 2017 15:16:58 +0200 Subject: [PATCH] Make sure the python path is configurable --- build.cake | 1 + cake/BuildExternals.cake | 2 +- cake/UtilsNative.cake | 2 +- 3 files changed, 3 insertions(+), 2 deletions(-) diff --git a/build.cake b/build.cake index f104f466..652e4458 100644 --- a/build.cake +++ b/build.cake @@ -23,6 +23,7 @@ var GenApiToolPath = GetToolPath ("Microsoft.DotNet.BuildTools.GenAPI/tools/GenA var MDocPath = MakeAbsolute ((FilePath)"externals/api-doc-tools/bin/Release/mdoc.exe"); var SNToolPath = GetSNToolPath (EnvironmentVariable ("SN_EXE")); var MSBuildToolPath = GetMSBuildToolPath (EnvironmentVariable ("MSBUILD_EXE")); +var PythonToolPath = EnvironmentVariable ("PYTHON_EXE") ?? "python"; var VERSION_ASSEMBLY = "1.59.0.0"; var VERSION_FILE = "1.59.1.0"; diff --git a/cake/BuildExternals.cake b/cake/BuildExternals.cake index cdeac9af..14c85596 100644 --- a/cake/BuildExternals.cake +++ b/cake/BuildExternals.cake @@ -63,7 +63,7 @@ Task ("externals-init") .IsDependentOn ("externals-harfbuzz") .Does (() => { - RunProcess ("python", new ProcessSettings { + RunProcess (PythonToolPath, new ProcessSettings { Arguments = SKIA_PATH.CombineWithFilePath ("tools/git-sync-deps").FullPath, WorkingDirectory = SKIA_PATH.FullPath, }); diff --git a/cake/UtilsNative.cake b/cake/UtilsNative.cake index fa15eb11..4dfbafef 100644 --- a/cake/UtilsNative.cake +++ b/cake/UtilsNative.cake @@ -8,7 +8,7 @@ var RunGyp = new Action ((defines, generators) => Information ("\tGYP_GENERATORS = " + EnvironmentVariable ("GYP_GENERATORS")); Information ("\tGYP_DEFINES = " + EnvironmentVariable ("GYP_DEFINES")); - RunProcess ("python", new ProcessSettings { + RunProcess (PythonToolPath, new ProcessSettings { Arguments = SKIA_PATH.CombineWithFilePath("bin/sync-and-gyp").FullPath, WorkingDirectory = SKIA_PATH.FullPath, });