diff options
Diffstat (limited to 'src/plugins/python/pythonutils.cpp')
| -rw-r--r-- | src/plugins/python/pythonutils.cpp | 20 |
1 files changed, 0 insertions, 20 deletions
diff --git a/src/plugins/python/pythonutils.cpp b/src/plugins/python/pythonutils.cpp index 1bc72aed0f4..2936d4f4c5d 100644 --- a/src/plugins/python/pythonutils.cpp +++ b/src/plugins/python/pythonutils.cpp @@ -167,26 +167,6 @@ PythonProject *pythonProjectForFile(const FilePath &file) return nullptr; } -void createVenv(const FilePath &python, - const FilePath &venvPath, - const std::function<void(bool)> &callback) -{ - QTC_ASSERT(python.isExecutableFile(), callback(false); return); - QTC_ASSERT(!venvPath.exists() || venvPath.isDir(), callback(false); return); - - const CommandLine command(python, QStringList{"-m", "venv", venvPath.toUserOutput()}); - - auto process = new Process; - auto progress = new Core::ProcessProgress(process); - progress->setDisplayName(Tr::tr("Create Python venv")); - QObject::connect(process, &Process::done, [process, callback](){ - callback(process->result() == ProcessResult::FinishedWithSuccess); - process->deleteLater(); - }); - process->setCommand(command); - process->start(); -} - bool isVenvPython(const FilePath &python) { return python.parentDir().parentDir().pathAppended("pyvenv.cfg").exists(); |
