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
There was a problem with detecting system-wide pythons, which relied on
binary not being a part of conda env or virtualenv. But it led to
unrelated Hatch and Poetry pythons automatically configured as
interpreters in new projects. Another problem is that free-threaded
python was chosen as default interpreter with highest priority because
of the newest version.
This change uses SystemPythonService to detect system pythons properly,
also free-threaded python used as a default interpreter only if it's the
only available option.
Merge-request: IJ-MR-179008
Merged-by: Alexey Katsman <alexey.katsman@jetbrains.com>
GitOrigin-RevId: 73bc98aed2918c44832b57f22b86c9c7d17a4301
API changes:
Class `Args` is not used to provide arguments for commands. Previous implementation was incompatible with Targets.
Instead of `Path` we now accept `BinaryToExec` which is either Eel or Target based.
Impl:
`ExecServiceImpl` now delegates execution to `com.intellij.python.community.execService.impl.processLaunchers`: there are two functions (Eel and Targets)
Merge-request: IJ-MR-171488
Merged-by: Ilya Kazakevich <ilya.kazakevich@jetbrains.com>
GitOrigin-RevId: 4c4ac7023e6605caaacb1880d60faf145b4160bf
Extract various classes to the shared modules, `ExecutablePython` now has `env` map as it can be used by conda.
GitOrigin-RevId: eb45ea29f49132fa4f91c979f71453e6a2ade344
Use `ExecService` `api.kt` to exec any binary and extensions from `execService.python/api.kt` for python-specific things (i.e helpers)
GitOrigin-RevId: bb217798a9d1ee886c4b12220ec1f66a5ef08336