https://github.com/python/cpython/commit/aec7f5f8b2e8b5e02869cdb4e1f8a9ef87c9f953
commit: aec7f5f8b2e8b5e02869cdb4e1f8a9ef87c9f953
branch: main
author: Hood Chatham <[email protected]>
committer: ambv <[email protected]>
date: 2025-07-21T00:30:35+02:00
summary:

gh-136852: Emscripten: Add PYTHON_NODE_VERSION environment variable (#136853)

To choose the node version we use. Together with:
https://github.com/python/buildmaster-config/pull/614
closes #136852.

files:
M Tools/wasm/emscripten/__main__.py

diff --git a/Tools/wasm/emscripten/__main__.py 
b/Tools/wasm/emscripten/__main__.py
index dc8422420a564c..24b989f75f7b2b 100644
--- a/Tools/wasm/emscripten/__main__.py
+++ b/Tools/wasm/emscripten/__main__.py
@@ -206,6 +206,17 @@ def configure_emscripten_python(context, working_dir):
         sysconfig_data += "-pydebug"
 
     host_runner = context.host_runner
+    if node_version := os.environ.get("PYTHON_NODE_VERSION", None):
+        res = subprocess.run(
+            [
+                "bash",
+                "-c",
+                f"source ~/.nvm/nvm.sh && nvm which {node_version}",
+            ],
+            text=True,
+            capture_output=True,
+        )
+        host_runner = res.stdout
     pkg_config_path_dir = (PREFIX_DIR / "lib/pkgconfig/").resolve()
     env_additions = {
         "CONFIG_SITE": config_site,

_______________________________________________
Python-checkins mailing list -- [email protected]
To unsubscribe send an email to [email protected]
https://mail.python.org/mailman3//lists/python-checkins.python.org
Member address: [email protected]

Reply via email to