From 6b3dee58a3908c8dc128adf8cade61214045c946 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Alexis=20M=C3=A9taireau?= Date: Tue, 7 Jan 2025 11:19:07 +0100 Subject: [PATCH] Make `uv sync` use a specific venv when building If not specifying it, it tries to write a `.venv` in the current dir which isn't writeable, and fails. --- dev_scripts/env.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/dev_scripts/env.py b/dev_scripts/env.py index e8ae233..07c82fd 100755 --- a/dev_scripts/env.py +++ b/dev_scripts/env.py @@ -182,8 +182,9 @@ ENV PATH="$PATH:/home/user/.local/bin" RUN pipx install uv COPY pyproject.toml uv.lock /home/user/dangerzone/ -# XXX Not sure why, but permission problems with the command below. Commenting it out for now as `uv` will get the deps later on. -# RUN cd /home/user/dangerzone && uv venv .venv-{distro}-{version} && uv sync +RUN uv venv /home/user/.venv +ENV UV_PROJECT_ENVIRONMENT="/home/user/.venv" +RUN cd /home/user/dangerzone && uv sync """ DOCKERFILE_BUILD_DEBIAN_DEPS = r"""