When calling /opt/venv/bin/myscript PATH is not properly defined
ikus060 opened this issue · 0 comments
Using dh-virtualenv to install a packages, command line entrypoint are properly created into the virtual env as /opt/venv/bin/myscript
. For a user, it's possible to call then directly. But when doing so, the executable get started without the appropriate modification of PATH and PYTHONHOME. This can cause a problem for some project that expect to call executable. Someone would expect the executable to be loaded from the same virtualenv. But since PATH is not properly define to use the virtualenv, either the executable is not found or the wrong version is loaded from the operating system.
Expected behaviour.
In addition to shebang update, I would expect dh-virtualenv to update the script to define the PATH.
I would recommand replacing the shebang by something similar to
env PATH=/opt/venv/bin:$PATH python