MCPcopy
hub / github.com/pyodide/pyodide / get_makefile_envs

Function get_makefile_envs

tools/common.py:8–31  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

6
7
8def get_makefile_envs() -> dict[str, str]:
9 result = subprocess.run(
10 ["make", "-f", str(PYODIDE_ROOT / "Makefile.envs"), ".output_vars"],
11 capture_output=True,
12 text=True,
13 env={"PYODIDE_ROOT": str(PYODIDE_ROOT)},
14 check=False,
15 )
16
17 if result.returncode != 0:
18 print("ERROR: Failed to load environment variables from Makefile.envs")
19 sys.exit(1)
20
21 environment = {}
22 for line in result.stdout.splitlines():
23 equalPos = line.find("=")
24 if equalPos != -1:
25 varname = line[0:equalPos]
26
27 value = line[equalPos + 1 :]
28 value = value.strip("'").strip()
29 environment[varname] = value
30
31 return environment

Callers 2

mainFunction · 0.90
make_test_list.pyFile · 0.90

Calls 2

findMethod · 0.80
runMethod · 0.45

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…