devenv
devenv copied to clipboard
Add support for `uv` project management
Adds support to python.nix to use uv sync when enabled and uv >= 0.4.4
uv 0.4.4 is the first version to respect UV_PROJECT_ENVIRONMENT which
allows uv to play nicely with the venv created by devenv (not .venv)
Looks like a great start :) Thank you so much!
Could you also add a test to tests?
How do I generate docs so that check will pass?
Error: Error: Pushing to https://github.com/lamalex/devenv
remote: Permission to lamalex/devenv.git denied to github-actions[bot].
fatal: unable to access 'https://github.com/lamalex/devenv/': The requested URL returned error: 403
@sandydoo I think we've enabled this for PRs, but we'd have to target upstream branch for it to work.
@lamalex
error: at /run/github-runner/cachix-x86_64-linux/devenv/devenv/tests/python-uv-sync/devenv.nix:2:1:
1| { pkgs, config, ... }:
2| : let
| ^
3| pkgs-unstable = import inputs.nixpkgs-unstable { system = pkgs.stdenv.system; };
error: syntax error, unexpected ':'
I've rebased and cleaned up in 7df6f2bc57c3d4793d3f96e791a09c0f5261c1ac, but I'm seeing test fail:
~/dev/cachix/devenv/tests/python-uv-sync/directory ~/dev/cachix/devenv/tests/python-uv-sync
Using Python 3.11.8 interpreter at: /nix/store/nbiqypvcx2k9g8d7s4l0h3ym0hz8fa50-python3-3.11.8-env/bin/python3
Creating virtualenv at: /home/domen/dev/cachix/devenv/tests/python-uv-sync/.devenv/state/venv
error: Unable to find lockfile at `uv.lock`. To create a lockfile, run `uv lock` or `uv sync`.
uv sync failed. Run 'uv sync' manually.
~/dev/cachix/devenv/tests/python-uv-sync
@lamalex any idea what's going on?
Seems like we need to commit the initial uv.lock.
I've merged this manually, thank you!