You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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?
The text was updated successfully, but these errors were encountered:
Virtual environments are not portable -- to try and "fake" it as you want, you'll need to provide a stable #!/usr/bin/python3.Y and use the same 3.Y version in all your containers.
Yes, I've got that setup. The containers use the same versions as the mounted venv. The setup currently uses pip itself, and I'm trying to transition it all to using poetry.
The is that the plugin is using the new executable inside the bundle target and passing that to poetry, instead of using the executable that the command was called from, which poetry then uses to run the pip installs, which creates the shebangs pointing to the new python executable.
It would be nice to have a way to specify which python to use for installation, I assumed that's what --python did but I imagine that it simple uses that to create the new executable.
I've found a workaround here with the poetry export command with a few people having similar issues. It would be nice as an additional bundler to use, alongside the venv bundler.
If this sounds like within the scope of this plugin, I'm happy to work on a PR for this feature?
I'm trying to bundle into a specific folder, which I can do with
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 errorAdding
--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?
The text was updated successfully, but these errors were encountered: