From e6e16d5befa83ecddea7960b8edb9d1c590bfad5 Mon Sep 17 00:00:00 2001 From: Ankit Jain Date: Wed, 19 May 2021 19:28:21 -0400 Subject: [PATCH 1/2] Set `EMSDK_PYTHON=../python3` to match what `emsdk_env.sh` does We add the path containing the python binaries from the packages to `PATH`, but that contains `python3`, and not `python`. When we run `emcc --version` on a machine without a system python, it fails with `unable to find python in $PATH` This was not caught with our regular testing, possibly because a system `python` was available on those machines. `emsdk_env.sh` sets `EMSDK_PYTHON = /Users/radical/dev/r3/src/mono/wasm/emsdk/python/3.7.4-2_64bit/bin/python3` .. so, this commit adds the same for running `emcc`, and sets that to `python3` from the package. This was tested on macOS. --- eng/sdk_files/Emscripten.Python.props | 1 + 1 file changed, 1 insertion(+) diff --git a/eng/sdk_files/Emscripten.Python.props b/eng/sdk_files/Emscripten.Python.props index 2d18f7b6ef..1c3001bf43 100644 --- a/eng/sdk_files/Emscripten.Python.props +++ b/eng/sdk_files/Emscripten.Python.props @@ -9,5 +9,6 @@ + From 763d71558514941b43e1b1e736cd1a63f8807d6d Mon Sep 17 00:00:00 2001 From: Ankit Jain Date: Thu, 20 May 2021 14:07:27 -0400 Subject: [PATCH 2/2] Use python.exe on windows --- eng/sdk_files/Emscripten.Python.props | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/eng/sdk_files/Emscripten.Python.props b/eng/sdk_files/Emscripten.Python.props index 1c3001bf43..b423d30c41 100644 --- a/eng/sdk_files/Emscripten.Python.props +++ b/eng/sdk_files/Emscripten.Python.props @@ -5,10 +5,13 @@ $(EmscriptenPythonToolsPath)bin\ $(EmscriptenPythonToolsPath) - - - - + <_EmscriptenPython Condition="!$([MSBuild]::IsOSPlatform('WINDOWS'))">$(EmscriptenPythonBinPath)\python3 + <_EmscriptenPython Condition="$([MSBuild]::IsOSPlatform('WINDOWS'))" >$(EmscriptenPythonBinPath)\python.exe + + + + +