Skip to content

Scripts don't work with virtual projects #1453

@ffoxdd

Description

@ffoxdd

Steps to Reproduce

For virtual projects, scripts cannot be run with rye run.

This is a shame since using virtual projects is the easiest way to build a container with Docker. Most of my projects need this, so an important rye feature is missing much of the time.

To reproduce, set up your pyproject.toml like this:

# ...

[project.scripts]
my-script = "my_project.my_script:main"

# ...

[tool.rye]
virtual = true

Expected Result

I would expect it to run the script.

Actual Result

> rye run my-script
error: invalid or unknown script 'my-script'

Version Info

rye 0.43.0
commit: unknown (d67cac1 2024-12-09)
platform: macos (aarch64)
self-python: [email protected]
symlink support: true
uv enabled: true

Stacktrace

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions