INNER CODE UNIT · Python
cleanup_build_files
Silverlan/pragma · build_scripts/build_third_party_libs.py:79
def cleanup_build_files(resultData):
if resultData is not None:
buildDir = resultData.get("buildDir")
if buildDir:
safe_remove_tree(buildDir)
subLibs = resultData.get("subLibs")
if subLibs:
for name, info in subLibs.items():
cleanup_build_files(info)
def build_library(name, *args, **kwargs):
# If --clean-deps-build-files was specified, we'll skip the build if the binaries already exist in the staging
# target location. This prevents the rebuilding of libraries we have already built previously.
# If the flag wasn't specified, we always build. In this case the build cache should skip the build anyway unless
# something has changed.
if not config.clean_deps_build_files or not Path(get_library_root_dir(name)).is_dir():
res = build_third_party_library(name, *args, **kwargs)
os.chdir(config.deps_dir)