Skip to content

Commit

Permalink
Fix wheel build
Browse files Browse the repository at this point in the history
  • Loading branch information
charleshofer committed Nov 22, 2024
1 parent f3aea1d commit 28d8a10
Showing 1 changed file with 17 additions and 0 deletions.
17 changes: 17 additions & 0 deletions build/rocm/tools/build_wheels.py
Original file line number Diff line number Diff line change
Expand Up @@ -303,6 +303,23 @@ def main():
LOG.info("Copying %s into %s" % (whl, wheelhouse_dir))
shutil.copy(whl, wheelhouse_dir)

# delete the 'dist' directory since it causes permissions issues
logging.info('Deleting dist, egg-info and cache directory')
shutil.rmtree(os.path.join(args.jax_path, "dist"))
shutil.rmtree(os.path.join(args.jax_path, "jax.egg-info"))
shutil.rmtree(os.path.join(args.jax_path, "jax", "__pycache__"))

# make the wheels delete-abl by the runner
whl_house = os.path.join(args.jax_path, "wheelhouse")
logging.info(f'Changing permissions for {whl_house}')
mode = (stat.S_IRUSR | stat.S_IWUSR | stat.S_IXUSR |
stat.S_IRGRP | stat.S_IWGRP | stat.S_IXGRP |
stat.S_IROTH | stat.S_IWOTH | stat.S_IXOTH )
for item in os.listdir(whl_house):
whl_path = os.path.join(whl_house, item)
if os.path.isfile(whl_path):
os.chmod(whl_path, mode)


if __name__ == "__main__":
logging.basicConfig(level=logging.INFO)
Expand Down

0 comments on commit 28d8a10

Please sign in to comment.