Skip to content

Commit

Permalink
move built wheel instead of copy
Browse files Browse the repository at this point in the history
  • Loading branch information
saikonen committed Nov 22, 2023
1 parent 78e0d9a commit 3d71ae9
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions metaflow/plugins/pypi/pip.py
Original file line number Diff line number Diff line change
Expand Up @@ -132,13 +132,12 @@ def _grab_wheel_from_path(path):
return wheels[0]

# Create wheels path if it does not exist yet, which is possible as we build before downloading.
if not os.path.isdir("%s/.pip/wheels" % prefix):
os.mkdir("%s/.pip/wheels" % prefix)
os.makedirs("%s/.pip/wheels" % prefix, exist_ok=True)

for package, local_path in results:
built_wheel = _grab_wheel_from_path(local_path)
target_path = "%s/.pip/wheels/%s" % (prefix, built_wheel)
shutil.copy(os.path.join(local_path, built_wheel), target_path)
shutil.move(os.path.join(local_path, built_wheel), target_path)
metadata[package["url"]] = target_path

# write the url to wheel mappings in a magic location
Expand Down

0 comments on commit 3d71ae9

Please sign in to comment.