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

Executable projects with underscores do not run #1399

Open
homocomputeris opened this issue Sep 27, 2024 · 0 comments
Open

Executable projects with underscores do not run #1399

homocomputeris opened this issue Sep 27, 2024 · 0 comments

Comments

@homocomputeris
Copy link

homocomputeris commented Sep 27, 2024

Steps to Reproduce

user@box ~/Code % rye init --script my_project
success: Initialized project in /home/user/Code/my_project
  Run `rye sync` to get started
user@box ~/Code % cd my_project
user@box ~/Code/my_project (git)-[master] % rye run my_project
Initializing new virtualenv in /home/user/Code/my_project/.venv
Python version: [email protected]
error: invalid or unknown script 'my_project'
1 user@box ~/Code/my_project (git)-[master] %

Expected Result

Run project as script as described in https://rye.astral.sh/guide/basics/#executable-projects

user@box ~/Code % rye init --script my-project
success: Initialized project in /home/user/Code/my-project
  Run `rye sync` to get started
user@box ~/Code % cd my-project
user@box ~/Code/my-project (git)-[master] % rye sync
Initializing new virtualenv in /home/user/Code/my-project/.venv
Python version: [email protected]
Generating production lockfile: /home/user/Code/my-project/requirements.lock
Generating dev lockfile: /home/user/Code/my-project/requirements-dev.lock
Installing dependencies
Resolved 1 package in 3ms
   Built my-project @ file:///home/user/Code/my-project
Prepared 1 package in 333ms
Installed 1 package in 1ms
 + my-project==0.1.0 (from file:///home/user/Code/my-project)
Done!
user@box ~/Code/my-project (git)-[master] % rye run my-project
Hello from my-project!

Actual Result

error: invalid or unknown script 'my_project'

Version Info

rye --version
rye 0.39.0
commit: 0.39.0 (bf3ccf8 2024-08-21)
platform: linux (x86_64)
self-python: [email protected]
symlink support: true
uv enabled: true

Stacktrace

No response

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