| 424 | } |
| 425 | |
| 426 | bool AbstractPythonInterface::checkSetup(bool requestInstall, bool *newInstall) |
| 427 | { |
| 428 | PythonExec exes = venvPythonExecs(true); |
| 429 | qDebug() << "::::: FOUND PYTHON EXECS: " << exes.python << exes.pip; |
| 430 | if (!exes.python.isEmpty() && !exes.pip.isEmpty() && std::find(m_scripts.cbegin(), m_scripts.cend(), QString()) == m_scripts.cend()) { |
| 431 | qDebug() << "//// SCRIPT VALUES: " << m_scripts.values(); |
| 432 | if (m_installStatus == Unknown) { |
| 433 | setStatus(Installed); |
| 434 | } |
| 435 | return true; |
| 436 | } |
| 437 | if (!checkVenv(false, requestInstall)) { |
| 438 | return false; |
| 439 | } |
| 440 | if (requestInstall) { |
| 441 | *newInstall = true; |
| 442 | } |
| 443 | |
| 444 | QMapIterator<QString, QString> i(m_scripts); |
| 445 | while (i.hasNext()) { |
| 446 | i.next(); |
| 447 | if (i.value().isEmpty()) { |
| 448 | return false; |
| 449 | } |
| 450 | } |
| 451 | return true; |
| 452 | } |
| 453 | |
| 454 | bool AbstractPythonInterface::setupVenv() |
| 455 | { |
no test coverage detected