Install PyPy/GraalPy into ~/.local/bin as pypy/graalpy#14201
Install PyPy/GraalPy into ~/.local/bin as pypy/graalpy#14201RazerM wants to merge 1 commit intoastral-sh:mainfrom
Conversation
crates/uv-python/src/installation.rs
Outdated
| match self.implementation() { | ||
| LenientImplementationName::Known(ImplementationName::PyPy) => "pypy", | ||
| LenientImplementationName::Known(ImplementationName::GraalPy) => "graalpy", | ||
| LenientImplementationName::Known(ImplementationName::CPython) => "python", | ||
| LenientImplementationName::Unknown(_) => "python", | ||
| } |
There was a problem hiding this comment.
FYI this duplicates some code found in ManagedPythonInstallation::executable:
uv/crates/uv-python/src/managed.rs
Lines 365 to 369 in a82c210
There was a problem hiding this comment.
That other code seems wrong, I think we should just do #14337
Here, I think we should probably do the same thing and make use of
uv/crates/uv-python/src/implementation.rs
Lines 74 to 81 in 2966471
There was a problem hiding this comment.
Oh funny, that doesn't work because of cpython, I guess we need a special case for that 😭 I'll push a commit to that pull request for it
|
It would be a pretty big breaking change to just do this by default. I would think if we wanted to do this we'd want to default to installing it as both python3.12 and pypy3.12, with an option to opt out of the "default" name. This kind of change needs a lot of design work. |
|
The feature is in preview, so we can make changes like this though I agree we need to do some design work to be certain we should. I'm not sure if we should ever install PyPy or GraalPy as |
I agree, and I don't think it's common. I'm not aware of any way to install PyPy (I have no experience with GraalPy) which would put it on your See also https://doc.pypy.org/en/latest/build.html#installation (emphasis mine):
|
Motivated by some code duplication highlighted in #14201, I noticed we weren't taking advantage of the existing implementation for casting to a str here. Unfortunately, we do need a special case for CPython still.
e0004c2 to
bf27ceb
Compare
|
Was this overlooked when the feature was stabilized for 0.8, or you decided |
|
We just didn't get to this, but we should. |
bf27ceb to
7f29aba
Compare
…of `python` (#17756) Copy of #14201 for #17661 Co-authored-by: Frazer McLean <[email protected]>
|
Moved to #17756 — thank you! |
…of `python` (#17756) Copy of #14201 for #17661 Co-authored-by: Frazer McLean <[email protected]>
…of `python` (#17756) Copy of #14201 for #17661 Co-authored-by: Frazer McLean <[email protected]>
…of `python` (#17756) Copy of #14201 for #17661 Co-authored-by: Frazer McLean <[email protected]>
…of `python` (#17756) Copy of #14201 for #17661 Co-authored-by: Frazer McLean <[email protected]>
…of `python` (#17756) Copy of #14201 for #17661 Co-authored-by: Frazer McLean <[email protected]>
…of `python` (#17756) Copy of #14201 for #17661 Co-authored-by: Frazer McLean <[email protected]>
Summary
Resolves #13565
Test Plan
Running the install and uninstall commands.