Poetry shell missing scripts
What happened?
Scripts from the python package are not available on the path of the devbox shell since updating from 1.7.1.
Details
The example in the devbox repo runs on poetry version 1.7.1
Poetry is a major version ahead of this now and poetry shell is implemented by a plugin. poetry docs
The command itself shows:
Looks like you're trying to use a Poetry command that is not available.
Since Poetry (2.0.0), the shell command is not installed by default. You can use,
- the new env activate command (recommended); or
- the shell plugin to install the shell command
Maybe its just the examples that are out of date because I see that the plugin code uses: poetry env use ... instead.
This fork shows 3 steps:
- Update poetry
- Add a python script to the pyproject.toml
- Hack the
init_hookto get the script working in the devbox shell.
What the the best way to fix this? Is there another way to do thing without using the poetry installed python?
I am happy to work on the fix.
Steps to reproduce
- Follow the 3 small commits in my fork
Command
No response
devbox.json
... see the fork
Devbox version
0.14.2
Nix version
nix (Nix) 2.28.4
What system does this bug occur on?
macOS (Intel)
Is the init hook in the plugin not working with the new version? AFAICT the env use command is still valid for starting your environment?
I've tested your changes and I think I understand the fixes. Do you want to contribute your change to the project? I'd be happy to test and merge a PR if you open one.
Hi @Lagoja , Thanks, I'd like to make a PR but I would like to clarify that it is acceptable first because it seems to violate the idea that devbox/nix should manage the python interpreter.
Is this acceptable to the project ?
@Lagoja https://github.com/jetify-com/devbox/pull/2691
Any movement here @Lagoja ?