-
Notifications
You must be signed in to change notification settings - Fork 906
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
Add an option to not create the activate* scripts in venvs #10070
Comments
Sort of compelling. I'm not sure it's a project setting, i.e., it seems more like a user setting? I'd be confused if some repository I cloned wouldn't let me activate the environment. |
I like this personally. Took a look through the code and might try to work it in the morning (so long as my 9 month old doesn’t have other plans) Never written more than a small coding challenge in rust, but I’d permanently have this setting on so it feels like a nice quality of life bump which is good motivation to learn. If I do have the time, I’ll probably put up a draft pretty quickly in the morning to make sure I’m not entirely off base. Does uv have a concept of settings that are global/user only but not local/project? An example doesn’t come to mind right now. Personally, there are quite a few options I’d find odd to be set at the project level that (as far as I can tell) uv would have no problem with you configuring in pyproject.toml. My thought would be to add an override flag to |
yeah I know, I'd still want to enforce that to my users :D but I'd be satisfied with just per-user setting. |
@zanieb Please let me know if I'm off base with the change in that PR. Like I said, first time in a large Rust project so I won't be offended if you tell me I broke something. Looking at adding |
Reason: appeal to authority :D
https://x.com/charliermarsh/status/1837538829579796751
https://x.com/mitsuhiko/status/1837539297622110422
… and there seems to be an agreeing sentiment.
I do think that activating venvs is a bad practice, and confusing too, so what I'd want to do to my personal projects is have a setting in [tool.uv] activate-scripts=true/false in
pyproject.toml
so that uv venv/sync doesn't create them, and I'd want to train my users to useuv run
.Additionally, I should be able to configure that in ~/.config/uv/uv.toml to force the default for projects that don't specify it in their own pyproject.toml.
The text was updated successfully, but these errors were encountered: