MCPcopy Create free account
hub / github.com/fabioz/PyDev.Debugger / main

Function main

build_tools/build_binaries_windows.py:42–82  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

40
41
42def main():
43 from generate_code import generate_dont_trace_files
44 from generate_code import generate_cython_module
45
46 # First, make sure that our code is up to date.
47 generate_dont_trace_files()
48 generate_cython_module()
49
50 for python_install in python_installations:
51 assert os.path.exists(python_install), "%s does not exist." % (python_install,)
52
53 from build import remove_binaries
54
55 remove_binaries([".pyd"])
56
57 for f in list_binaries():
58 raise AssertionError("Binary not removed: %s" % (f,))
59
60 for i, python_install in enumerate(python_installations):
61 print()
62 print("*" * 80)
63 print("*" * 80)
64 print()
65 new_name = "pydevd_cython_%s_%s" % (sys.platform, extract_version(python_install))
66 args = [
67 python_install,
68 os.path.join(root_dir, "build_tools", "build.py"),
69 "--no-remove-binaries",
70 "--target-pyd-name=%s" % new_name,
71 "--force-cython",
72 ]
73 if i != 0:
74 args.append("--no-regenerate-files")
75 name_frame_eval = "pydevd_frame_evaluator_%s_%s" % (sys.platform, extract_version(python_install))
76 args.append("--target-pyd-frame-eval=%s" % name_frame_eval)
77 print("Calling: %s" % (" ".join(args)))
78
79 env = os.environ.copy()
80 python_exe_dir = os.path.dirname(python_install)
81 env["PATH"] = env["PATH"] + ";" + os.path.join(python_exe_dir, "DLLs") + ";" + os.path.join(python_exe_dir, "Library", "bin")
82 subprocess.check_call(args, env=env)
83
84
85if __name__ == "__main__":

Callers 1

Calls 8

generate_cython_moduleFunction · 0.90
remove_binariesFunction · 0.90
copyMethod · 0.80
list_binariesFunction · 0.70
extract_versionFunction · 0.70
joinMethod · 0.45
appendMethod · 0.45

Tested by

no test coverage detected