File tree 1 file changed +3
-3
lines changed
1 file changed +3
-3
lines changed Original file line number Diff line number Diff line change @@ -156,29 +156,29 @@ def build_and_save_output(root_path, __version__):
156
156
shutil .copy (fpath , dist_directory )
157
157
158
158
# Find the .whl file path
159
+ whl_path = None
159
160
for fname in os .listdir (dist_directory ):
160
161
if __version__ in fname and fname .endswith (".whl" ):
161
162
whl_path = os .path .abspath (os .path .join (dist_directory , fname ))
162
163
print (f"Build successful. Wheel file available at { whl_path } " )
164
+ return whl_path
163
165
164
166
165
167
def build (root_path ):
166
168
if os .path .exists (build_directory ):
167
169
raise ValueError (f"Directory already exists: { build_directory } " )
168
170
169
- whl_path = None
170
171
try :
171
172
copy_source_to_build_directory (root_path )
172
173
run_namex_conversion ()
173
174
create_legacy_directory ()
174
175
from keras_core .src .version import __version__ # noqa: E402
175
176
176
177
export_version_string (__version__ )
177
- build_and_save_output (root_path , __version__ )
178
+ return build_and_save_output (root_path , __version__ )
178
179
finally :
179
180
# Clean up: remove the build directory (no longer needed)
180
181
shutil .rmtree (build_directory )
181
- return whl_path
182
182
183
183
184
184
def install_whl (whl_fpath ):
You can’t perform that action at this time.
0 commit comments