MCPcopy
hub / github.com/astral-sh/python-build-standalone / run

Function run

build.py:15–39  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

13
14
15def run():
16 env = dict(os.environ)
17 env["PYTHONUNBUFFERED"] = "1"
18 python = sys.executable
19 system = platform.system()
20
21 if system == "Darwin" or system == "Linux":
22 args = [
23 python,
24 "build-main.py",
25 *sys.argv[1:],
26 ]
27 make_dir = ROOT / "cpython-unix"
28 os.chdir(make_dir)
29 return os.execve(python, args, env)
30 elif system == "Windows":
31 args = [
32 python,
33 "build.py",
34 *sys.argv[1:],
35 ]
36 cwd = str(ROOT / "cpython-windows")
37 return subprocess.run(args, cwd=cwd, env=env, check=True, bufsize=0)
38 else:
39 raise Exception(f"Unsupported host system: {system}")
40
41
42if __name__ == "__main__":

Callers 1

build.pyFile · 0.70

Calls 1

runMethod · 0.45

Tested by

no test coverage detected