Lines Matching refs:local_path
803 local_path = os.path.join(ROOT_DIR, dep.target_folder)
805 deps_updated |= CheckoutGitRepo(local_path, dep.source_url, dep.checksum,
808 is_compressed = any([local_path.endswith(ext) for ext in ['.zip', '.tgz', '.tbz2']])
809 compressed_target_dir = os.path.splitext(local_path)[0] if is_compressed else None
812 if ((not is_compressed and HashLocalFile(local_path) == dep.checksum) or
819 if HashLocalFile(local_path) != dep.checksum:
820 download_path = local_path + '.tmp'
821 logging.info('Downloading %s from %s', local_path, dep.source_url)
830 shutil.move(download_path, local_path)
834 assert (HashLocalFile(local_path) == dep.checksum)
837 logging.info('Extracting %s into %s' % (local_path, compressed_target_dir))
842 if local_path.endswith('.tgz'):
844 subprocess.check_call(['tar', '-oxf', local_path], cwd=compressed_target_dir)
845 elif local_path.endswith('.zip'):
846 with zipfile.ZipFile(local_path, 'r') as zf:
849 elif local_path.endswith('.tbz2'):
850 tar_path = '{}.tar.tmp'.format(local_path)
852 with bz2.open(local_path, 'r') as bf:
870 os.remove(local_path)