mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-27 10:03:11 +07:00
[python] PY-84910 PY-79486: (WIP) Replace old SDK configuration process with new one if enabled.
When registry key is enabled, we replace all other SDK configurations (done by inspection and open processors) with a new one. We also have an action to start this process GitOrigin-RevId: 425ae78b769c5b5d40974cee9f19227410f63d45
This commit is contained in:
committed by
intellij-monorepo-bot
parent
6e44d31480
commit
011c111b86
@@ -66,6 +66,7 @@ jvm_library(
|
||||
"//python/common",
|
||||
"//platform/non-modal-welcome-screen/backend",
|
||||
"//python/python-exec-service:community-execService",
|
||||
"//python/python-sdk-configurator/common",
|
||||
],
|
||||
runtime_deps = ["//python/python-features-trainer:featuresTrainer"],
|
||||
plugins = ["@lib//:compose-plugin"]
|
||||
@@ -138,6 +139,7 @@ jvm_library(
|
||||
"//platform/non-modal-welcome-screen/backend",
|
||||
"//python/python-exec-service:community-execService",
|
||||
"//python/python-exec-service:community-execService_test_lib",
|
||||
"//python/python-sdk-configurator/common",
|
||||
],
|
||||
plugins = ["@lib//:compose-plugin"]
|
||||
)
|
||||
|
||||
@@ -80,5 +80,6 @@
|
||||
<orderEntry type="module" module-name="intellij.python.common" />
|
||||
<orderEntry type="module" module-name="intellij.platform.ide.nonModalWelcomeScreen.backend" />
|
||||
<orderEntry type="module" module-name="intellij.python.community.execService" />
|
||||
<orderEntry type="module" module-name="intellij.python.sdkConfigurator.common" />
|
||||
</component>
|
||||
</module>
|
||||
@@ -6,6 +6,7 @@
|
||||
<module name="intellij.platform.whatsNew"/>
|
||||
<module name="intellij.platform.ide.nonModalWelcomeScreen"/>
|
||||
<module name="intellij.platform.ide.nonModalWelcomeScreen.backend"/>
|
||||
<module name="intellij.python.sdkConfigurator.common"/>
|
||||
</dependencies>
|
||||
|
||||
<projectListeners>
|
||||
|
||||
@@ -6,6 +6,7 @@ import com.intellij.openapi.application.ApplicationManager
|
||||
import com.intellij.openapi.application.EDT
|
||||
import com.intellij.openapi.diagnostic.debug
|
||||
import com.intellij.openapi.diagnostic.thisLogger
|
||||
import com.intellij.openapi.extensions.ExtensionNotApplicableException
|
||||
import com.intellij.openapi.module.Module
|
||||
import com.intellij.openapi.project.Project
|
||||
import com.intellij.openapi.project.ProjectManager
|
||||
@@ -25,6 +26,7 @@ import com.intellij.platform.ide.progress.withBackgroundProgress
|
||||
import com.intellij.platform.util.progress.reportRawProgress
|
||||
import com.intellij.python.community.services.systemPython.SystemPython
|
||||
import com.intellij.python.community.services.systemPython.SystemPythonService
|
||||
import com.intellij.python.sdkConfigurator.common.enableSDKAutoConfigurator
|
||||
import com.jetbrains.python.PyBundle
|
||||
import com.jetbrains.python.packaging.utils.PyPackageCoroutine
|
||||
import com.jetbrains.python.sdk.*
|
||||
@@ -41,6 +43,13 @@ import java.nio.file.Path
|
||||
|
||||
|
||||
class PythonSdkConfigurator : DirectoryProjectConfigurator {
|
||||
init {
|
||||
// new SDK configurator obsoletes this engine
|
||||
if (enableSDKAutoConfigurator) {
|
||||
throw ExtensionNotApplicableException.create()
|
||||
}
|
||||
}
|
||||
|
||||
override fun configureProject(project: Project, baseDir: VirtualFile, moduleRef: Ref<Module>, isProjectCreatedWithWizard: Boolean) {
|
||||
val sdk = project.pythonSdk
|
||||
thisLogger().debug { "Input: $sdk, $isProjectCreatedWithWizard" }
|
||||
|
||||
Reference in New Issue
Block a user