Skip to content

Commit

Permalink
Update Python interpreter system path order on MacOS.
Browse files Browse the repository at this point in the history
  • Loading branch information
robertbartel authored and PhilMiller committed Mar 20, 2024
1 parent 74cef07 commit c0b6216
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions include/utilities/python/InterpreterUtil.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -146,7 +146,11 @@ namespace utils {
py::object requestedDirPath = Path(directoryPath);
if (py::bool_(requestedDirPath.attr("is_dir")())) {
if (std::find(sys_path_vector.begin(), sys_path_vector.end(), directoryPath) == sys_path_vector.end()) {
#ifdef __APPLE__
sys_path.attr("insert")(1, py::str(directoryPath));
#else
sys_path.attr("insert")(sys_path_vector.size(), py::str(directoryPath));
#endif
}
}
else {
Expand Down

0 comments on commit c0b6216

Please sign in to comment.