python-poetry / python-poetry/poetry-plugin-bundle
Bundling with specifying interpreter?
Nobody has claimed this yet.
- Dominant language
- Python
- Stars
- 151
- Forks
- 30
- Avg merge
- 48m
- Merged PRs (30d)
- 5
Description
I'm trying to bundle into a specific folder, which I can do with
poetry bundle venv /path/to/folder
However, This folder is mounted and dismounted into various containers, with the actual location of the mount changing.
In this scenario, I would like the shebang at the top of the bin files to just be #!python , instead they are the full #!/path/to/folder/python. Leading to the following error
/some/script.sh: /mnt/bin/executable: /path/to/folder/python: bad interpreter: No such file or directory
Adding --python python does not seem to change this, it sets it to the python executable location that is present on the container that performs the bundle.
Is there a way around this?
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by tracing the poetry bundle venv /path/to/folder command and how its --python option determines generated shebangs. Reproduce the bundle in a mounted directory whose path changes, then verify that the bin scripts use a relocatable #!python shebang and work from the new location.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- python
- Domain
- build-system, cli
- Issue type
- Feature
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100