-
Notifications
You must be signed in to change notification settings - Fork 31
Open
Description
The following command succeeds, but then calling an entrypoint from this bundle fails because the shebangs stores the python exectuable path as a relative with respect to the directory we launched the first command from.
In the example, we install black in order to have an executable entrypoint, but any other entrypoint would work
poetry new -n issute_test
cd issue_test
poetry add black
poetry bundle venv ../issue_test_bundle
../issue_test_bundle/bin/black -h # this works
cd .. && ./issue_test_bundle/bin/black -h # this failsThe error message :
zsh: ./issue_test_bundle/bin/black: bad interpreter: ../issue_test_bundle/bin/python: aucun fichier ou dossier de ce nom
The created black file in issue_test_bundle/black :
#!../issue_test_bundle/bin/python
# -*- coding: utf-8 -*-
import re
import sys
from black import patched_main
if __name__ == "__main__":
sys.argv[0] = re.sub(r"(-script\.pyw|\.exe)?$", "", sys.argv[0])
sys.exit(patched_main())Metadata
Metadata
Assignees
Labels
No labels