()
| 40 | |
| 41 | |
| 42 | def 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 | |
| 85 | if __name__ == "__main__": |
no test coverage detected