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

shebangs in packaged venv are unusable without activating environment #15

Open
manuco opened this issue Jul 31, 2019 · 0 comments
Open

Comments

@manuco
Copy link

manuco commented Jul 31, 2019

Today, venv_pack replaces all shebang of console scripts with the "/usr/bin/env python" trick that will use the path. This approach only works when the venv is "activated" and the python interpreter of this venv is placed in the $PATH. With a proper shebang, those commands would be usable without activating the environment, thus working more reliably.

The proper way to do this would be to have a post-unarchive script that fix things all around (fix the venv to base interpreter simlink, the shebang, etc.). This script could lay in the bin directory of the environment and fix this env when called with the local python interpreter. Another idea is to add an option which allow the caller to set the destination shebang. It is not as convenient, but will allow packaging scripts to set shebangs to something they can compute.

Is there any plan to do a thing like this? Is this idea ok, or am I missing something?

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