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

Method install_async

src/python/package_manager.cpp:503–524  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

501 }
502
503 bool PackageManager::install_async(const std::string& package,
504 UvRunner::OutputCallback on_output,
505 UvRunner::CompletionCallback on_complete) {
506 if (!ensure_venv())
507 return false;
508
509 if (!m_runner) {
510 m_runner = std::make_unique<UvRunner>();
511 }
512
513 if (m_runner->is_running()) {
514 LOG_ERROR("Another UV operation is already running");
515 return false;
516 }
517
518 LOG_INFO("Installing {} (async)", package);
519
520 m_runner->set_output_callback(std::move(on_output));
521 m_runner->set_completion_callback(std::move(on_complete));
522
523 return m_runner->start({"pip", "install", package, "--python", lfs::core::path_to_utf8(venv_python())});
524 }
525
526 bool PackageManager::uninstall_async(const std::string& package,
527 UvRunner::OutputCallback on_output,

Callers

nothing calls this directly

Calls 6

moveFunction · 0.85
path_to_utf8Function · 0.85
set_output_callbackMethod · 0.80
is_runningMethod · 0.45
startMethod · 0.45

Tested by

no test coverage detected