astral-sh / rye

a Hassle-Free Python Experience
https://rye.astral.sh
MIT License
13.65k stars 466 forks source link

Make DEFAULT_KIND Configurable. #279

Open T-256 opened 1 year ago

T-256 commented 1 year ago
>rye toolchain register C:\python37x86\python.exe --name 32
Registered C:\python37x86\python.exe as 32@3.7.9

>rye toolchain list
32@3.7.9 (C:\python37x86\python.exe)

>rye pin 3.7
pinned 3.7.9 in .python-version

when use rye sync it's going to download cpython@3.7.9. there is already version 3.7.9 in toolchains and expect to use 32@3.7.9 toolchain. if not found any available version it can go to download cpython as current behavior.

mitsuhiko commented 1 year ago

Today the default is cpython. If you register with the name cpython you will prevent the automatic fetching. There is nothing better yet other than to be explicit about the name otherwise. What kind of behavior would make sense?

T-256 commented 1 year ago

If you register with the name cpython you will prevent the automatic fetching.

ah right, I completely forgot it.

What kind of behavior would make sense?

IMO it could be global option for pypy users, or 32bit users of cpython like me :) (I have 32bit versions under "32" name)

[behavior]
default_kind = "pypy"