MCPcopy Create free account
hub / github.com/PyO3/setuptools-rust / install_pyodide_emscripten

Function install_pyodide_emscripten

noxfile.py:237–260  ·  view source on GitHub ↗
(session: nox.Session)

Source from the content-addressed store, hash-verified

235
236@nox.session(name="install-pyodide-emscripten")
237def install_pyodide_emscripten(session: nox.Session):
238 with session.chdir(EMSCRIPTEN_DIR):
239 session.run("npm", "install", f"pyodide@{PYODIDE_VERSION}", external=True)
240 emscripten_version = session.run(
241 "node", "get_emscripten_version.js", external=True, silent=True
242 ).strip()
243 python_version = session.run(
244 "node", "get_python_version.js", external=True, silent=True
245 ).strip()
246
247 with ExitStack() as stack:
248 if "GITHUB_ENV" in os.environ:
249 out = stack.enter_context(open(os.environ["GITHUB_ENV"], "a"))
250 else:
251 out = sys.stdout
252
253 print(f"PYODIDE_VERSION={PYODIDE_VERSION}", file=out)
254 print(f"EMSCRIPTEN_VERSION={emscripten_version}", file=out)
255 print(f"PYTHON_VERSION={python_version}", file=out)
256
257 if "GITHUB_ENV" not in os.environ:
258 print(
259 "You will need to install emscripten yourself to match the target version."
260 )
261
262
263@nox.session(name="test-examples-emscripten")

Callers

nothing calls this directly

Calls 1

runMethod · 0.45

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…