-
Notifications
You must be signed in to change notification settings - Fork 355
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 option to auto-activate uv #1626
base: main
Are you sure you want to change the base?
Conversation
Shouldn't that be on by default? |
I just mimicked the options of |
Now I'm double-checking the code, and maybe the problem happens because the task to sync uv, happens before the one for activating venv? that would explain why uv is not using the correct python (it is lacking the libraries defined in |
Can you provide a way to reproduce the issue? |
FWIW, I get around this with using
|
@wgordon17 This does not seem to work properly with devenv shell. On a fresh system without using direnv to load in first, uv will not install the packages. |
The following works: { pkgs, ... }:
{
languages.python = {
enable = true;
uv.enable = true;
uv.sync.enable = true;
};
enterShell = ''
source $DEVENV_STATE/venv/bin/activate
'';
} The issue is that the |
should we instead be just sourcing? |
Yes, as far as I understand |
That's what I'm doing locally, but I think it's better to have it as an option, that's the reason for the pr. |
Yes, I know. I only looked at your changes after posting my comment. It was in reply to @wgordon17, because that was the workaround I was previously using. Is there anything that speaks against automatically sourcing if |
Maybe not wanting to "activate" the venv, as some may like to use |
I think instead of adding a new option, we should fix |
No description provided.