-
Notifications
You must be signed in to change notification settings - Fork 893
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
Uv script install into .venv overwrites python #5152
Labels
bug
Something isn't working
Comments
Lol 🤦 |
Thanks for reproducing over here! |
I wonder what |
I tested pip 24.0 now in the same project and it seems like it overwrites the symlink, not the symlink target. so .venv/bin/python is overwritten. |
Thank you. |
charliermarsh
added a commit
that referenced
this issue
Jul 17, 2024
## Summary It turns out that if `path` is a symlink, `File::create(path)?.write_all(content.as_ref())?` will overwrite the _target_ file. That means an entrypoint named `python` would actually overwrite the user's source Python executable, which is symlinked into the virtual environment. This PR replaces that code with our atomic write method. Closes #5152. ## Test Plan I ran through the test plan `https://github.com/astral-sh/uv/issues/5152`, but used an executable named `bar` linked to `foo.txt` instead...
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
python
. It has a script calledpython
Based on astral-sh/rye#1235. I think this is could be a bug in Uv?
Tested and reproduced with uv only (then uv 0.2.24, not the latest, I'm sorry).
uv 0.2.24
platform: linux (x86_64)
The text was updated successfully, but these errors were encountered: