(session: nox.Session)
| 235 | |
| 236 | @nox.session(name="install-pyodide-emscripten") |
| 237 | def 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") |
nothing calls this directly
no test coverage detected
searching dependent graphs…