mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-18 09:34:34 +07:00
Python: Introduce functions to call code against SDK:
See `sdkExecApi.kt` GitOrigin-RevId: 0014b607ee6efa058e9144cfb208c7e75dff1e47
This commit is contained in:
committed by
intellij-monorepo-bot
parent
030246de49
commit
12960161ff
@@ -55,7 +55,7 @@ class HatchRuntime(
|
||||
* Doesn't make any validation of stdout/stderr content.
|
||||
*/
|
||||
internal suspend fun <T> execute(vararg arguments: String, processOutputTransformer: ProcessOutputTransformer<T>): PyResult<T> {
|
||||
return execService.execute(hatchBinary, arguments.toList(), execOptions, processOutputTransformer = processOutputTransformer)
|
||||
return execService.execute(hatchBinary, Args(*arguments), execOptions, processOutputTransformer = processOutputTransformer)
|
||||
}
|
||||
|
||||
internal suspend fun <T> executeInteractive(vararg arguments: String, processSemiInteractiveFun: ProcessSemiInteractiveFun<T>): PyResult<T> {
|
||||
@@ -64,7 +64,7 @@ class HatchRuntime(
|
||||
|
||||
internal suspend fun resolvePythonVirtualEnvironment(pythonHomePath: PythonHomePath): PyResult<PythonVirtualEnvironment> {
|
||||
val pythonVersion = pythonHomePath.takeIf { it.isDirectory() }?.resolvePythonBinary()?.let { pythonBinaryPath ->
|
||||
execService.execGetStdout(pythonBinaryPath, listOf("--version"),
|
||||
execService.execGetStdout(pythonBinaryPath, Args("--version"),
|
||||
ExecOptions(timeout = 20.minutes),
|
||||
procListener = null).getOr { return it }.trim()
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user