| 246 | } |
| 247 | |
| 248 | std::filesystem::path findPythonModuleDir() { |
| 249 | std::error_code ec; |
| 250 | const auto cwd = std::filesystem::current_path(ec); |
| 251 | const auto project_root = std::filesystem::path(PROJECT_ROOT_PATH); |
| 252 | |
| 253 | for (const auto& candidate : { |
| 254 | cwd / "src" / "python", |
| 255 | cwd.parent_path() / "src" / "python", |
| 256 | project_root / "build" / "src" / "python", |
| 257 | }) { |
| 258 | if (containsLichtfeldModule(candidate)) { |
| 259 | return candidate; |
| 260 | } |
| 261 | } |
| 262 | |
| 263 | return {}; |
| 264 | } |
| 265 | |
| 266 | void prependPythonPath(const std::filesystem::path& path) { |
| 267 | const auto value = path.string(); |
no test coverage detected