MCPcopy Create free account
hub / github.com/MrNeRF/LichtFeld-Studio / findPythonModuleDir

Function findPythonModuleDir

tests/test_python_integration.cpp:248–264  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

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();

Callers 1

SetUpMethod · 0.85

Calls 1

containsLichtfeldModuleFunction · 0.85

Tested by

no test coverage detected