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

Function prepend_dev_python_source_path

src/python/runner.cpp:240–250  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

238
239#ifdef LFS_DEV_PYTHON_SOURCE_DIR
240 void prepend_dev_python_source_path(PyObject* const sys_path) {
241 const auto source_dir = lfs::core::utf8_to_path(LFS_DEV_PYTHON_SOURCE_DIR);
242 std::error_code ec;
243 if (!std::filesystem::exists(source_dir / "lfs_plugins", ec)) {
244 LOG_WARN("Python dev source path is unavailable: {}",
245 lfs::core::path_to_utf8(source_dir));
246 return;
247 }
248
249 prepend_sys_path_once(sys_path, source_dir, "dev source Python dir");
250 }
251
252 void start_dev_python_watcher(PyObject* const lfs_plugins) {
253 if (!env_flag_enabled("LFS_PYTHON_HOT_RELOAD", true)) {

Callers 1

ensure_initializedFunction · 0.85

Calls 3

utf8_to_pathFunction · 0.85
path_to_utf8Function · 0.85
prepend_sys_path_onceFunction · 0.85

Tested by

no test coverage detected