MCPcopy Create free account
hub / github.com/cztomczak/cefpython / create_cef_directories

Function create_cef_directories

tools/automate.py:305–328  ·  view source on GitHub ↗

Create cef/ directories in cef_build_dir/ and in chromium/src/ .

()

Source from the content-addressed store, hash-verified

303
304
305def create_cef_directories():
306 """Create cef/ directories in cef_build_dir/ and in chromium/src/ ."""
307 if Options.no_cef_update:
308 return
309 cef_dir = os.path.join(Options.cef_build_dir, "cef")
310 src_dir = os.path.join(Options.cef_build_dir, "chromium", "src")
311 cef_dir2 = os.path.join(src_dir, "cef")
312 # Clone cef repo and checkout branch
313 if os.path.exists(cef_dir):
314 rmdir(cef_dir)
315 run_git("clone -b %s %s cef" % (Options.cef_branch, Options.cef_git_url),
316 Options.cef_build_dir)
317 if Options.cef_commit:
318 run_git("checkout %s" % Options.cef_commit, cef_dir)
319 # Update cef patches
320 update_cef_patches()
321 # Copy cef/ to chromium/src/ but only if chromium/src/ exists,
322 # but don't copy it and delete if exists when --force-chromium-update
323 # flag is passed, chromium throws error about unstaged changes.
324 if os.path.exists(src_dir):
325 if os.path.exists(cef_dir2):
326 rmdir(cef_dir2)
327 if not Options.force_chromium_update:
328 shutil.copytree(cef_dir, cef_dir2)
329
330
331def update_cef_patches():

Callers 1

build_cefFunction · 0.85

Calls 3

rmdirFunction · 0.85
run_gitFunction · 0.85
update_cef_patchesFunction · 0.85

Tested by

no test coverage detected