MCPcopy Index your code
hub / github.com/fabioz/PyDev.Debugger / build

Function build

build_tools/build.py:99–146  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

97
98
99def build():
100 if "--no-remove-binaries" not in sys.argv:
101 remove_binaries([".pyd", ".so"])
102
103 os.chdir(root_dir)
104
105 env = os.environ.copy()
106 if sys.platform == "win32":
107 # "C:\Program Files (x86)\Microsoft Visual Studio 9.0\VC\bin\vcvars64.bat"
108 # set MSSdk=1
109 # set DISTUTILS_USE_SDK=1
110 # set VS100COMNTOOLS=C:\Program Files (x86)\Microsoft Visual Studio 9.0\Common7\Tools
111
112 if "GITHUB_ACTION" not in os.environ:
113 FORCE_PYDEVD_VC_VARS = os.environ.get("FORCE_PYDEVD_VC_VARS")
114 if not FORCE_PYDEVD_VC_VARS:
115 FORCE_PYDEVD_VC_VARS = r"C:\Program Files (x86)\Microsoft Visual Studio\2017\BuildTools\VC\Auxiliary\Build\vcvars64.bat"
116 if not os.path.exists(FORCE_PYDEVD_VC_VARS):
117 raise RuntimeError("Unable to find vcvars64.bat Please set FORCE_PYDEVD_VC_VARS environment variable to the path to the vcvars64.bat file.")
118 if FORCE_PYDEVD_VC_VARS:
119 env.update(get_environment_from_batch_command([FORCE_PYDEVD_VC_VARS], initial=os.environ.copy()))
120 else:
121 raise AssertionError("Unable to setup environment for Python: %s" % (sys.version,))
122
123 env["MSSdk"] = "1"
124 env["DISTUTILS_USE_SDK"] = "1"
125
126 additional_args = []
127 for arg in sys.argv:
128 if arg.startswith("--target-pyd-name="):
129 additional_args.append(arg)
130 if arg.startswith("--target-pyd-frame-eval="):
131 additional_args.append(arg)
132 break
133 else:
134 additional_args.append("--force-cython") # Build always forces cython!
135
136 args = [
137 sys.executable,
138 os.path.join(os.path.dirname(__file__), "..", "setup_pydevd_cython.py"),
139 "build_ext",
140 "--inplace",
141 ] + additional_args
142 print("Calling args: %s" % (args,))
143 subprocess.check_call(
144 args,
145 env=env,
146 )
147
148
149if __name__ == "__main__":

Callers 1

build.pyFile · 0.70

Calls 7

remove_binariesFunction · 0.85
copyMethod · 0.80
getMethod · 0.45
updateMethod · 0.45
appendMethod · 0.45
joinMethod · 0.45

Tested by

no test coverage detected