MCPcopy Index your code
hub / github.com/python/cpython / validate_emsdk_version

Function validate_emsdk_version

Platforms/emscripten/__main__.py:81–94  ·  view source on GitHub ↗

Validate that the emsdk cache contains the required emscripten version.

(emsdk_cache)

Source from the content-addressed store, hash-verified

79
80@functools.cache
81def validate_emsdk_version(emsdk_cache):
82 """Validate that the emsdk cache contains the required emscripten version."""
83 if emsdk_cache is None:
84 print("Build will use EMSDK from current environment.")
85 return
86 required_version = required_emscripten_version()
87 emsdk_env = emsdk_activate_path(emsdk_cache)
88 if not emsdk_env.is_file():
89 print(
90 f"Required emscripten version {required_version} not found in {emsdk_cache}",
91 file=sys.stderr,
92 )
93 sys.exit(1)
94 print(f"✅ Emscripten version {required_version} found in {emsdk_cache}")
95
96
97def parse_env(text):

Callers 3

make_emscripten_libffiFunction · 0.85
make_mpdecFunction · 0.85

Calls 4

emsdk_activate_pathFunction · 0.85
is_fileMethod · 0.45
exitMethod · 0.45

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…