Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Scripts don't work with virtual projects #1453

Open
ffoxdd opened this issue Jan 7, 2025 · 1 comment
Open

Scripts don't work with virtual projects #1453

ffoxdd opened this issue Jan 7, 2025 · 1 comment

Comments

@ffoxdd
Copy link

ffoxdd commented Jan 7, 2025

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

@ffoxdd
Copy link
Author

ffoxdd commented Jan 8, 2025

For now I'm using @jennydaman's approach

#1086 (comment)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant