Skip to content

Commit becce74

Browse files
committed
Fix again
1 parent 004fe65 commit becce74

File tree

1 file changed

+1
-10
lines changed

1 file changed

+1
-10
lines changed

.ci/scripts/utils.sh

Lines changed: 1 addition & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -50,16 +50,7 @@ dedupe_macos_loader_path_rpaths() {
5050
fi
5151

5252
local torch_lib_dir
53-
torch_lib_dir=$(python - <<'PY'
54-
import os
55-
try:
56-
import torch
57-
except Exception:
58-
raise SystemExit(0)
59-
60-
print(os.path.join(os.path.dirname(torch.__file__), "lib"))
61-
PY
62-
)
53+
torch_lib_dir=$(python -c "import importlib.util; print(importlib.util.find_spec('torch').submodule_search_locations[0])")/lib
6354

6455
if [[ -z "${torch_lib_dir}" || ! -d "${torch_lib_dir}" ]]; then
6556
return

0 commit comments

Comments
 (0)