Skip to content

Commit

Permalink
Skip package download only for llvm
Browse files Browse the repository at this point in the history
  • Loading branch information
jithunnair-amd committed Jul 29, 2024
1 parent 6ffd5cf commit 73d521a
Showing 1 changed file with 13 additions and 11 deletions.
24 changes: 13 additions & 11 deletions python/setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -86,17 +86,19 @@ def get_thirdparty_packages(triton_cache_path):
if p.syspath_var_name in os.environ:
package_dir = os.environ[p.syspath_var_name]
test_file_path = os.path.join(package_dir, p.test_file)
print(f"Skipping download and extract of {p.url}")
# if not os.path.exists(test_file_path):
# try:
# shutil.rmtree(package_root_dir)
# except Exception:
# pass
# os.makedirs(package_root_dir, exist_ok=True)
# print(f'downloading and extracting {p.url} for {p.name} ...')
# ftpstream = urllib.request.urlopen(p.url)
# file = tarfile.open(fileobj=ftpstream, mode="r|*")
# file.extractall(path=package_root_dir)
if p.name == "llvm":
print(f"Skipping download and extract of {p.url}")
else:
if not os.path.exists(test_file_path):
try:
shutil.rmtree(package_root_dir)
except Exception:
pass
os.makedirs(package_root_dir, exist_ok=True)
print(f'downloading and extracting {p.url} for {p.name} ...')
ftpstream = urllib.request.urlopen(p.url)
file = tarfile.open(fileobj=ftpstream, mode="r|*")
file.extractall(path=package_root_dir)
if p.include_flag:
thirdparty_cmake_args.append(f"-D{p.include_flag}={package_dir}/include")
if p.lib_flag:
Expand Down

0 comments on commit 73d521a

Please sign in to comment.