MCPcopy Index your code
hub / github.com/nodejs/node / FetchDeps

Function FetchDeps

tools/v8/fetch_deps.py:76–106  ·  view source on GitHub ↗
(v8_path)

Source from the content-addressed store, hash-verified

74 return True
75
76def FetchDeps(v8_path):
77 # Verify path.
78 v8_path = os.path.abspath(v8_path)
79 assert os.path.isdir(v8_path)
80
81 # Check out depot_tools if necessary.
82 depot_tools = node_common.EnsureDepotTools(v8_path, True)
83
84 temporary_git = EnsureGit(v8_path)
85 try:
86 print("Fetching dependencies.")
87 env = os.environ.copy()
88 # gclient needs to have depot_tools in the PATH.
89 env["PATH"] = depot_tools + os.pathsep + env["PATH"]
90 gclient = os.path.join(depot_tools, "gclient.py")
91 spec = "solutions = %s" % GCLIENT_SOLUTION
92 subprocess.check_call([sys.executable, gclient, "sync", "--spec", spec],
93 cwd=os.path.join(v8_path, os.path.pardir),
94 env=env)
95 except:
96 raise
97 finally:
98 if temporary_git:
99 node_common.UninitGit(v8_path)
100 # Clean up .gclient_entries file.
101 gclient_entries = os.path.normpath(
102 os.path.join(v8_path, os.pardir, ".gclient_entries"))
103 if os.path.isfile(gclient_entries):
104 os.remove(gclient_entries)
105
106 return depot_tools
107
108
109if __name__ == "__main__":

Callers 1

fetch_deps.pyFile · 0.85

Calls 5

EnsureGitFunction · 0.85
copyMethod · 0.65
printFunction · 0.50
joinMethod · 0.45
removeMethod · 0.45

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…