Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

When calling /opt/venv/bin/myscript PATH is not properly defined #351

Open
ikus060 opened this issue Nov 4, 2022 · 0 comments
Open

When calling /opt/venv/bin/myscript PATH is not properly defined #351

ikus060 opened this issue Nov 4, 2022 · 0 comments

Comments

@ikus060
Copy link

ikus060 commented Nov 4, 2022

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
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant