You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
// All exes in the bin directory of the symlink are also symlinks (thats generally of the form /Applications/Xcode.app/Contents/Developer/Library/Frameworks/Python3.framework/Versions/3.9/bin/python3.9)
74
+
for exe infind_executables(symlink.parent().unwrap()){
75
+
symlinks.push(exe);
76
+
}
77
+
}
78
+
79
+
// Possible the env.executable is "/Applications/Xcode.app/Contents/Developer/Library/Frameworks/Python3.framework/Versions/3.9/bin/python3.9"
80
+
// The symlink to the above exe is in /Applications/Xcode.app/Contents/Developer/usr/bin/python3
81
+
// Lets try to find that, because /usr/bin/python3 could also exist and when we run python, the sys.execuctable points to the file /Applications/Xcode.app/Contents/Developer/usr/bin/python3
82
+
// The name of the `Xcode.app` folder can be different on other machines, e.g. on CI it is `Xcode_15.0.1.app`
83
+
let xcode_folder_name = exe_str.split('/').nth(2).unwrap_or_default();
84
+
85
+
let bin = PathBuf::from(format!(
86
+
"/Applications/{}/Contents/Developer/usr/bin",
87
+
xcode_folder_name
88
+
));
89
+
let exe = bin.join("python3");
90
+
ifletSome(symlink) = resolve_symlink(&exe){
91
+
if symlinks.contains(&symlink){
92
+
symlinks.push(exe.clone());
93
+
94
+
// All exes in this directory are symlinks
95
+
for exe infind_executables(bin){
96
+
symlinks.push(exe);
97
+
}
98
+
}
69
99
}
70
100
71
101
// We know /usr/bin/python3 can end up pointing to this same Python exe as well
0 commit comments