-
Notifications
You must be signed in to change notification settings - Fork 2.4k
Add pypy executables when calling uv venv
#5047
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
Conversation
| WindowsExecutable::PyPy => "venvlauncher.exe", | ||
| WindowsExecutable::PyPyw => "venvwlauncher.exe", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I have no idea whether this is correct or not.
Reading a comment below I seemed to understand that the shims changed name in Python 3.13 but after installing it doesn't seem like it.
Also I think this shouldn't apply to PyPy for the time being since it supports up to Python 3.10 only.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can you add a comment explaining this?
pypy executables when calling uv venvpypy executables when calling uv venv
|
It looks like pypy always has |
|
I merged #5048 so we can have most of the test changes separate from here — lmk if the conflicts are a problem. |
|
We could add one for Windows but let's do it separately as a follow-up pull request, I suspect it'll be a little painful. |
|
And yeah I'd add the versioned binaries to match the standard behavior. |
bfdfb1b to
edee0d2
Compare
|
@zanieb cool, will add the binaries then. I already handled the conflicts. 👍 |
|
PR ready. 👍 |
|
Nice :) |
Summary
Should fix #2092.
This PR changes
uv venvso it also creates symlinks topypyon Unix and copies executables on Windows when creating a new environment using PyPy.I found a bit of discrepancy between creation of a venv using
pythonanduv, as usingpythonbrings all the executables with it. Whileuvbrings only those without any version number, at least on Windows. The behaviour is different on Unix as we take the versioned symlinks too.Some examples below.
python -m venvgenerates the followingScriptsfolder.uv venvinstead generates this.Test Plan
To verify the correct behaviour:
uv venv -p <path_to_pypy_>.\.venv\Scripts\activateon Windows or./.venv/Scripts/activateon UnixpypyI thought of writing some automated tests but I couldn't rely on
uv python installcommand to install PyPy as it's not in the list of installable Python builds.