mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-27 10:03:11 +07:00
PY-80049: Check Python2 version correctly.
We execute `--version` to find python version. Since 3.4 Python uses stdout for output, but before that it used stderr. We now check both: stdout and stderr. GitOrigin-RevId: ca9059b71cabbd1a94e26523192cdf9eeb8c1eb1
This commit is contained in:
committed by
intellij-monorepo-bot
parent
f313e649fd
commit
92b5532dc1
-1
@@ -41,7 +41,6 @@ abstract class PythonType<T : Any>(private val tag: @NonNls String) {
|
||||
?: error("Can't get language level for $flavor , $binary")
|
||||
}
|
||||
.sortedByDescending { (_, languageLevel) -> languageLevel }
|
||||
.filter { (_, languageLevel) -> languageLevel.isPy3K }
|
||||
.map { (path, _) -> path }
|
||||
}
|
||||
return pythons.asFlow()
|
||||
|
||||
+4
-2
@@ -11,7 +11,7 @@ import com.jetbrains.python.PyNames
|
||||
import com.jetbrains.python.PythonBinary
|
||||
import java.nio.file.Path
|
||||
|
||||
data object TypeVanillaPython3 : PythonType<PythonBinary>("python3") {
|
||||
open class TypeVanillaPython(tag: String) : PythonType<PythonBinary>(tag) {
|
||||
override suspend fun createSdkFor(python: PythonBinary): Sdk = createSdk(python)
|
||||
|
||||
fun createSdk(python: PythonBinary): Sdk =
|
||||
@@ -27,4 +27,6 @@ data object TypeVanillaPython3 : PythonType<PythonBinary>("python3") {
|
||||
Disposer.dispose(disposable)
|
||||
})
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
object TypeVanillaPython3 : TypeVanillaPython("python3")
|
||||
Reference in New Issue
Block a user