Commit 9c20e17c authored by Jérome Perrin's avatar Jérome Perrin

software/theia: don't set a python in $PATH

This is a big changes for users, now typing "python" on the command line
will use system python if it exists or fail with "command not found".

`python3` is set to the SlapOS python from Theia software release.
Recommended approach for python users is either to get used to type
`python3` or to create a virtualenv and use it. With the virtualenv,
they can also install pylint or other linters, so this might be the
best thing to do.

This solves two problems:

First problem is that it makes the embedded SlapOS always have a python
interpreter as `python` in $PATH, which is not always the case in other
SlapOS usage and can hide problems that would cause a software to build
successfully in Theia but not in "bare metal" SlapOS.

Second problem problem is that on python was a interpreter from pygolang
and it is not perfect regarding line edition at least on python 3.8, as
we can observe in this session:

run python and type "something":

```
Python 3.8.13 (default, Sep  6 2022, 10:45:07)
[GCC 8.5.0] on linux
Type "help", "copyright", "credits" or "license" for more information.
(InteractiveConsole)
>>> something
             ^ cursor is here, as expected
```

type Ctrl+A to go to beginning of line:

```
Python 3.8.13 (default, Sep  6 2022, 10:45:07)
[GCC 8.5.0] on linux
Type "help", "copyright", "credits" or "license" for more information.
(InteractiveConsole)
>>> something
    ^ expected cursor position
^ actual cursor position
```

likewise, type Ctrl+E to go to end of line:

```
Python 3.8.13 (default, Sep  6 2022, 10:45:07)
[GCC 8.5.0] on linux
Type "help", "copyright", "credits" or "license" for more information.
(InteractiveConsole)
>>> something
             ^ expected cursor position
         ^ actual cursor position
```
parent 2c2b5c3a
......@@ -155,6 +155,7 @@ needs-these-eggs-scripts-in-path =
[python-for-buildout-languageserver]
<= python-interpreter
interpreter = ${:_buildout_section_name_}
executable = ${buildout:bin-directory}/${:interpreter}
eggs +=
zc.buildout.languageserver
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment