-
Notifications
You must be signed in to change notification settings - Fork 101
uv sync does not respect VIRTUAL_ENV #267
Copy link
Copy link
Closed
Labels
bugSomething isn't workingSomething isn't working
Description
Oversight in
uv sync does not respect VIRTUAL_ENV like Poetry did
uv add/uv sync/... do not respect the active virtualenv, should they? astral-sh/uv#6612 (comment)- Support custom venv locations for
uv syncastral-sh/uv#5229
#14 [python_builder 6/9] RUN uv sync --locked --no-default-groups --no-install-project
#14 0.113 warning: `VIRTUAL_ENV=/opt/venv` does not match the project environment path `.venv` and will be ignored; use `--active` to target the active environment instead
In the case of python-blueprint it ends up "working" because
RUN uv build && \
pip install dist/*.whlwill install the (unlocked) dependencies for the project.
The recommended alternative from uv is UV_PROJECT_ENVIRONMENT
- Allow customizing the project environment path with
UV_PROJECT_ENVIRONMENTastral-sh/uv#6834 - https://docs.astral.sh/uv/concepts/projects/config/#project-environment-path
Or the default .venv could be hard-coded.
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
bugSomething isn't workingSomething isn't working