Description
Describe the bug
In qmi.core.config_defs
configstruct CfgContext
it is possible to define virtualenv_path
value. This is meant to point to the location of the possible virtual Python environment to be used in the context. Currently it is used in QMI only in qmi.tools.proc
here. But the implementation is
a) obsoleted as new 'venvs' do not usually set separately 'python3' anymore, but simply 'python';
b) the subdir 'bin' is used in Unix-like environments only. In Windows, it is 'Scripts'. Probably need to define it with '.exe' as well.
When running this on more recent Python and venv versions, or on a Windows PC, this will fail.
To Reproduce
Make a script to run a QMI context where the script module and 'virtualenv_path' are defined in qmi.conf
(or other QMI configuration file). Run the script with qmi_proc
or modern Python on Unix and Windows PC.
Expected behavior
The script will fail when trying to do os.path.join(venv_path, "bin", "python3")
on L287 of qmi_proc.py
.
Operating System (please complete the following information):
- OS: Linux, Windows
Additional context
- Python: 3.11 or newer
- virtual environment must be present or be created (and destroyed) when running the test script.