mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-01-06 03:21:12 +07:00
PY-73024 Jupyter(feat): Show waring and suggest update if notebook 6.x and python 3.7+, remove install jupyter warning
GitOrigin-RevId: 0de65c84f3cfc38436ace59034a9c5ce3909eb38
This commit is contained in:
committed by
intellij-monorepo-bot
parent
1cfcce3b7a
commit
80aad882d5
@@ -47,9 +47,18 @@ object PyPackageInstallUtils {
|
||||
return true
|
||||
}
|
||||
|
||||
suspend fun installPackage(project: Project, sdk: Sdk, packageName: String): Result<List<PythonPackage>> {
|
||||
suspend fun upgradePackage(project: Project, sdk: Sdk, packageName: String, version: String? = null): Result<List<PythonPackage>> {
|
||||
val pythonPackageManager = PythonPackageManager.forSdk(project, sdk)
|
||||
val packageSpecification = pythonPackageManager.repositoryManager.repositories.firstOrNull()?.createPackageSpecification(packageName)
|
||||
val packageSpecification = pythonPackageManager.repositoryManager.repositories.firstOrNull()?.createPackageSpecification(packageName, version)
|
||||
?: return Result.failure(Exception("Could not find any repositories"))
|
||||
|
||||
return pythonPackageManager.updatePackage(packageSpecification)
|
||||
}
|
||||
|
||||
|
||||
suspend fun installPackage(project: Project, sdk: Sdk, packageName: String, version: String? = null): Result<List<PythonPackage>> {
|
||||
val pythonPackageManager = PythonPackageManager.forSdk(project, sdk)
|
||||
val packageSpecification = pythonPackageManager.repositoryManager.repositories.firstOrNull()?.createPackageSpecification(packageName, version)
|
||||
?: return Result.failure(Exception("Could not find any repositories"))
|
||||
|
||||
return pythonPackageManager.installPackage(packageSpecification)
|
||||
|
||||
Reference in New Issue
Block a user