Add conda doc

GitOrigin-RevId: b6bc66d0bcd643ac48f83396df41e11875a6b279
This commit is contained in:
Ilya.Kazakevich
2022-10-18 20:27:31 +02:00
committed by intellij-monorepo-bot
parent da2d68b5a8
commit 29ccb7031a

View File

@@ -4,12 +4,19 @@ import com.intellij.execution.target.TargetedCommandLineBuilder
import com.intellij.openapi.projectRoots.Sdk
import com.jetbrains.python.sdk.PySdkUtil
/**
* Each [PythonSdkFlavor] is associated with [PyFlavorData].
* For example: Conda flavor requires special data (conda binary path) to be stored in sdk additional data
*/
interface PyFlavorData {
/**
* Prepares [targetCommandLineBuilder] to run python on [sdk]
*/
fun prepareTargetCommandLine(sdk: Sdk, targetCommandLineBuilder: TargetedCommandLineBuilder)
/**
* Some flavors do not need data at all: the only thing thy need is sdk homepath
*/
object Empty : PyFlavorData {
override fun prepareTargetCommandLine(sdk: Sdk, targetCommandLineBuilder: TargetedCommandLineBuilder) {
if (sdk.homePath.isNullOrBlank()) {