Lines Matching refs:local_path
384 local_path = os.path.join(ROOT_DIR, rel_path)
386 deps_updated |= CheckoutGitRepo(local_path, url, expected_sha1)
388 is_zip = local_path.endswith('.zip') or local_path.endswith('.tgz')
389 zip_target_dir = local_path[:-4] if is_zip else None
392 if ((not is_zip and HashLocalFile(local_path) == expected_sha1) or
397 if HashLocalFile(local_path) != expected_sha1:
398 download_path = local_path + '.tmp'
399 logging.info('Downloading %s from %s', local_path, url)
408 os.rename(download_path, local_path)
409 assert(HashLocalFile(local_path) == expected_sha1)
412 logging.info('Extracting %s into %s' % (local_path, zip_target_dir))
419 if local_path.endswith('.tgz'):
421 subprocess.check_call(['tar', '-xf', local_path], cwd=zip_target_dir)
422 elif local_path.endswith('.zip'):
423 with zipfile.ZipFile(local_path, 'r') as zf:
440 os.remove(local_path)