22
22
install_conda ,
23
23
is_python_package_string ,
24
24
locate_working_dir ,
25
+ parse_traceback_error ,
25
26
run_setup_command ,
26
27
)
27
28
@@ -281,22 +282,31 @@ def _install(
281
282
conda_env_name = conda_env_name , cluster = cluster
282
283
)
283
284
logger .info (f"Running via install_method pip: { install_cmd } " )
284
- retcode = run_setup_command (install_cmd , cluster = cluster , node = node )[0 ]
285
- if retcode != 0 :
285
+ status_codes = run_setup_command (install_cmd , cluster = cluster , node = node )
286
+ ret_code = status_codes [0 ]
287
+ if ret_code != 0 :
286
288
raise RuntimeError (
287
- f"Pip install { install_cmd } failed, check that the package exists and is available for your platform."
289
+ parse_traceback_error (
290
+ status_codes [1 ],
291
+ fallback_msg = f"Pip install { install_cmd } failed, check that the package exists "
292
+ f"and is available for your platform." ,
293
+ )
288
294
)
289
295
290
296
elif self .install_method == "conda" :
291
297
install_cmd = self ._conda_install_cmd (
292
298
conda_env_name = conda_env_name , cluster = cluster
293
299
)
294
300
logger .info (f"Running via install_method conda: { install_cmd } " )
295
- retcode = run_setup_command (install_cmd , cluster = cluster , node = node )[0 ]
296
- if retcode != 0 :
301
+ status_codes = run_setup_command (install_cmd , cluster = cluster , node = node )
302
+ ret_code = status_codes [0 ]
303
+ if ret_code != 0 :
297
304
raise RuntimeError (
298
- f"Conda install { install_cmd } failed, check that the package exists and is "
299
- "available for your platform."
305
+ parse_traceback_error (
306
+ status_codes [1 ],
307
+ fallback_msg = f"Conda install { install_cmd } failed, check that the package exists and is "
308
+ "available for your platform." ,
309
+ )
300
310
)
301
311
302
312
elif self .install_method == "reqs" :
@@ -305,11 +315,19 @@ def _install(
305
315
)
306
316
if install_cmd :
307
317
logger .info (f"Running via install_method reqs: { install_cmd } " )
308
- retcode = run_setup_command (install_cmd , cluster = cluster , node = node )[0 ]
309
- if retcode != 0 :
318
+ status_codes = run_setup_command (
319
+ install_cmd , cluster = cluster , node = node
320
+ )
321
+ ret_code = status_codes [0 ]
322
+ if ret_code != 0 :
310
323
raise RuntimeError (
311
- f"Reqs install { install_cmd } failed, check that the package exists and is available for your platform."
324
+ parse_traceback_error (
325
+ status_codes [1 ],
326
+ fallback_msg = f"Reqs install { install_cmd } failed, check that the package exists "
327
+ f"and is available for your platform." ,
328
+ )
312
329
)
330
+
313
331
else :
314
332
logger .info (
315
333
f"{ self .install_target .full_local_path_str ()} /requirements.txt not found, skipping reqs install"
0 commit comments