js(build): reuse Python executable used to run main script
authorAlexander Alekhin <alexander.a.alekhin@gmail.com>
Thu, 24 Dec 2020 05:23:42 +0000 (05:23 +0000)
committerAlexander Alekhin <alexander.a.alekhin@gmail.com>
Thu, 24 Dec 2020 05:25:38 +0000 (05:25 +0000)
- don't switch between Python versions in the middle of the build

platforms/js/build_js.py

index afe37c6..37ff956 100644 (file)
@@ -77,7 +77,9 @@ class Builder:
             rm_one(d)
 
     def get_cmake_cmd(self):
-        cmd = ["cmake",
+        cmd = [
+            "cmake",
+            "-DPYTHON_DEFAULT_EXECUTABLE=%s" % sys.executable,
                "-DENABLE_PIC=FALSE", # To workaround emscripten upstream backend issue https://github.com/emscripten-core/emscripten/issues/8761
                "-DCMAKE_BUILD_TYPE=Release",
                "-DCMAKE_TOOLCHAIN_FILE='%s'" % self.get_toolchain_file(),