Lines Matching refs:local_path
509 local_path = os.path.join(ROOT_DIR, dep.target_folder)
511 deps_updated |= CheckoutGitRepo(local_path, dep.source_url, dep.checksum,
514 is_zip = local_path.endswith('.zip') or local_path.endswith('.tgz')
515 zip_target_dir = local_path[:-4] if is_zip else None
518 if ((not is_zip and HashLocalFile(local_path) == dep.checksum) or
525 if HashLocalFile(local_path) != dep.checksum:
526 download_path = local_path + '.tmp'
527 logging.info('Downloading %s from %s', local_path, dep.source_url)
536 shutil.move(download_path, local_path)
540 assert (HashLocalFile(local_path) == dep.checksum)
543 logging.info('Extracting %s into %s' % (local_path, zip_target_dir))
548 if local_path.endswith('.tgz'):
550 subprocess.check_call(['tar', '-xf', local_path], cwd=zip_target_dir)
551 elif local_path.endswith('.zip'):
552 with zipfile.ZipFile(local_path, 'r') as zf:
569 os.remove(local_path)