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

Function build_cefpython_modules

tools/build_distrib.py:498–527  ·  view source on GitHub ↗
(pythons, arch)

Source from the content-addressed store, hash-verified

496
497
498def build_cefpython_modules(pythons, arch):
499 for python in pythons:
500 print("[build_distrib.py] Build cefpython module for {python_name}"
501 .format(python_name=python["name"]))
502 flags = ""
503 if UNITTESTS:
504 flags += " --unittests"
505 # On Linux/Mac Makefiles are used and must pass --clean flag
506 command = ("\"{python}\" {build_py} {version} --clean {flags}"
507 .format(python=python["executable"],
508 build_py=os.path.join(TOOLS_DIR, "build.py"),
509 version=VERSION,
510 flags=flags))
511 # build.py may require sudo if system python, so shell=True
512 pcode = subprocess.call(command, shell=True)
513 if pcode != 0:
514 print("[build_distrib.py] ERROR: failed to build cefpython"
515 " module for {python_name}"
516 .format(python_name=python["name"]))
517 sys.exit(1)
518 print("[build_distrib.py] Built successfully cefpython module for"
519 " {python_name}".format(python_name=python["name"]))
520 # Issue #342
521 backup_subprocess_executable_issue342(python)
522
523 # Issue #342
524 restore_subprocess_executable_issue342(arch)
525
526 print("[build_distrib.py] Successfully built cefpython modules for {arch}"
527 .format(arch=arch))
528
529
530def backup_subprocess_executable_issue342(python):

Callers 1

mainFunction · 0.85

Tested by

no test coverage detected