devbox icon indicating copy to clipboard operation
devbox copied to clipboard

Poetry shell missing scripts

Open tlelson opened this issue 4 months ago • 5 comments

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:

  1. Update poetry
  2. Add a python script to the pyproject.toml
  3. Hack the init_hook to 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

  1. 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)

tlelson avatar Aug 19 '25 05:08 tlelson