MCPcopy Create free account
hub / github.com/IfcOpenShell/IfcOpenShell / get_pyodide_build_version

Function get_pyodide_build_version

nix/build-all.py:236–242  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

234 assert not missing_vars, f"Some variables required for WASM compilation are missing: {', '.join(missing_vars)}"
235
236 def get_pyodide_build_version() -> "tuple[int, ...]":
237 pyodide_build_suffix = "pyodide-build version:"
238 output = sp.check_output(["pyodide", "--version"], encoding="utf-8").strip()
239 assert pyodide_build_suffix in output, output
240 version_line = next(l for l in output.splitlines() if l.startswith(pyodide_build_suffix))
241 version = version_line.partition(":")[2].strip()
242 return tuple(map(int, version.split(".")))
243
244 # Pyodide still in transition from `FLAGS` to `FLAGS_INIT`.
245 # `FLAGS_INIT` allow us to provide flags using environment variables

Callers 1

build-all.pyFile · 0.85

Calls 1

splitMethod · 0.80

Tested by

no test coverage detected