| 54 | } |
| 55 | |
| 56 | static bool dirExists(const std::string& path) |
| 57 | { |
| 58 | // https://stackoverflow.com/q/18100097 |
| 59 | struct stat info; |
| 60 | |
| 61 | if(stat(path.c_str(), &info ) != 0) { |
| 62 | return false; |
| 63 | } else if(info.st_mode & S_IFDIR) { |
| 64 | return true; |
| 65 | } |
| 66 | return false; |
| 67 | } |
| 68 | |
| 69 | void setupPythonEnv(const std::string& binPath) |
| 70 | { |