[python]: PY-85585 : Do not display vens as system pythons in "Add new interpreter" window.

Instead of old `addManuallyAddedInterpreter` we now have two functions: one that requires system python and one that doesn't.

Both functions register system python if provided, but the latter one accepts any python (venv included).

Various "selectors" use these functions.

We also make sure no non-system python is set to `baseInterpreters`: base are always system!

As a bonus, we show "system" or "virtual env" title near interpreter.

It now checks that python is system (see `ensureSystemPython`).

Non-system pythons are never reported, and `registerSystemPython` also returns an error for non-system pythons

We need `execGetBoolFromStdout` for the further changes

Merge-request: IJ-MR-182415
Merged-by: Ilya Kazakevich <ilya.kazakevich@jetbrains.com>

(cherry picked from commit 2950f5f0cd2745c12987a92e40774d366568f312)

GitOrigin-RevId: f30e9a6cd7b5d103454d66f26a0c2282d7c587fc
This commit is contained in:
Ilya.Kazakevich
2025-11-19 15:24:40 +01:00
committed by intellij-monorepo-bot
parent ed0fda649a
commit 3388536d2c
25 changed files with 267 additions and 105 deletions

View File

@@ -1,3 +1,4 @@
python.get.version.error={0} returned error: {1}
python.get.version.wrong.version={0} has a wrong version: {1}
python.cannot.exec=Python {0} could not be executed
python.check.threading.fail=Can not check for python threading model