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

Support Local Python Installations #16

Closed
2 tasks
mitsuhiko opened this issue Apr 24, 2023 · 3 comments
Closed
2 tasks

Support Local Python Installations #16

mitsuhiko opened this issue Apr 24, 2023 · 3 comments
Labels
enhancement New feature or request

Comments

@mitsuhiko
Copy link
Collaborator

mitsuhiko commented Apr 24, 2023

On the version of rye I published there is currently no support for local Python installations. This is pretty much intentional because I really want the experience to not involve manually downloading Pythons. However there are also situations where this is necessary. In the original implementation I had, the way non automatically managed Python installations worked was with registering them.

Link a Python:

ln -s /path/to/python ~/.rye/py/[email protected]

And to pick a default distribution for what gets picked up when you write 3.11.0 another symlink does:

ln -s ~/.rye/py/[email protected] ~/.rye/py/3.11.0

I however never really fleshed out the details and it was pretty brittle. In particular the only way I found to reliably pin a project to pypy for instance was to write pypy@madeupversion into .python-version which obviously is not very portable.

Remaining tasks:

  • enable rye to work with a local toolchain entirely (eg: make the self venv work with a supplied one)
  • find a good way to pin to specific installations without throwing stuff into the .python-version file that other toolchains cannot work with
@mitsuhiko mitsuhiko added the enhancement New feature or request label Apr 24, 2023
@WhyNotHugo
Copy link
Contributor

rustup's implementation might be a good reference here:

rustup toolchain link system /usr
rustup default system

I guess making the default configurable is enough to cover this issue; I can already register the system one.

@cnpryer
Copy link
Contributor

cnpryer commented Apr 30, 2023

find a good way to pin to specific installations without throwing stuff into the .python-version file that other toolchains cannot work with

What about doing something like

[tool.rye]
managed = true
standalone-toolchain = false

With a predictable resolution strategy for this setting. Could take inspiration from py.

@mitsuhiko
Copy link
Collaborator Author

Closing this for now. It's possible now to register custom toolchains, for improvements in the handling individual tickets should be opened.

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

No branches or pull requests

3 participants