PY-85114: Introduce a Jupyter setting to change behaviour of python path: flat or src layout

GitOrigin-RevId: edb40bb3de10916d5f4df1b1d37e32a698754cbe
This commit is contained in:
Ilia Zakoulov
2026-01-14 14:15:42 +00:00
committed by intellij-monorepo-bot
parent 56fd81d321
commit c2ec1943cb
@@ -57,6 +57,7 @@ object PythonExecuteUtils {
workingDir: Path?,
additionalUploadLocalDir: Path?,
targetPortsForwarding: List<Int> = emptyList(),
buildPythonPath: Boolean = true,
): TargetProcessRunResult {
val execution = PythonModuleExecution()
execution.moduleName = pyModuleToRun
@@ -73,8 +74,10 @@ object PythonExecuteUtils {
val modules: Array<Module> = module?.let { arrayOf(it) } ?: project.modules
request.ensureProjectSdkAndModuleDirsAreOnTarget(project, *modules)
PythonCommandLineState.buildPythonPath(project, module, execution, sdk, null, false, true,
true, false, request)
if (buildPythonPath) {
PythonCommandLineState.buildPythonPath(project, module, execution, sdk, null, false, true,
true, false, request)
}
if (additionalUploadLocalDir != null) {
val uploadVolume = TargetEnvironment.UploadRoot(localRootPath = additionalUploadLocalDir, targetRootPath = TargetPath.Temporary())