Skip to content

Commit

Permalink
Always install the correct version with pip_build (keras-team#595)
Browse files Browse the repository at this point in the history
pip_build while create whl files in `/dist`, which aren't cleaned up
by the script unless you do so manually.

The script would install the first `.whl` it saw in `/dist`, which means
if you have been building multiple versions of keras-core, the install
script might grab the wrong one.

This makes sure to always grab the correct versioned `.whl`. Alternately
we could clear the `/dist` dir each time we build.
  • Loading branch information
mattdangerw authored and fchollet committed Jul 24, 2023
1 parent fa22d8b commit 7858c4f
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion pip_build.py
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,7 @@ def build():

# Find the .whl file path
for fname in os.listdir(dist_directory):
if fname.endswith(".whl"):
if __version__ in fname and fname.endswith(".whl"):
whl_path = os.path.abspath(os.path.join(dist_directory, fname))
print(f"Build successful. Wheel file available at {whl_path}")
finally:
Expand Down

0 comments on commit 7858c4f

Please sign in to comment.