venv_shell

Problem

One of the common needs is to have a shell with activated venv.

It is possible to do it manually, but:

  1. user has to figure out path to venv

  2. use the source command with an arg navigated to venv/bin/activate

It is inconvenient, especially because of the 1st step when path to venv is in env FT_89_41_35_82.conf_leap.md config file.

Solution

Provide a venv_shell command which does this automatically.

Additional features

  • Be able to pass an arbitrary command line to be executed by that shell (e.g. to support non-interactive mode).

Implementation

There is no (easy) way to avoid starting the bootstrap process specifically to go through the conf_leap until path to venv is identified.

But, to make start time quicker, the package installation step can be avoided. Also, to keep output clean, the default verbosity must be changed to "quiet". This is achieved via setting specific environment variables:

  • TODO: which

  • TODO: which

TODO: update when implemented: Another problem is CLI of the bootstrap is incompatible with passing arbitrary CLI args to the venv shell. See CLI_compatibility.

TODO: update when implemented: To make it work, the bootstrap process has to support a special arg which passes those arbitrary CLI args through multiple invocations of python_executable. TODO: Which one is this?