-
Notifications
You must be signed in to change notification settings - Fork 2.9k
Closed
Labels
configurationSettings and suchSettings and suchenhancementNew feature or improvement to existing functionalityNew feature or improvement to existing functionality
Description
Summary
uv currently doesn't have a way to disable dependency groups via env variable. @zanieb proposed something like UV_NO_DEV in the linked bug below, It would be nice if this could be generalized to instead be something like UV_EXCLUDE_GROUPS, where the groups can be comma-separated. This has an advantage in a docker-based environment — by using an ARG + ENV combo, I can build multiple versions of a docker image, such as one with dev dependencies, or one with GPU dependencies.
I guess there's an argument that all of group-picking behavior including whitelisting should be controllable via an env variable, but that feels like it might cause weird hierarchy issues.
astral-sh/uv-docker-example#36
Example
ARG UV_EXCLUDE_GROUPS=dev
ENV UV_EXCLUDE_GROUPS=${UV_EXCLUDE_GROUPS}
# implies --no-group dev => --no-dev
uv sync ...
# ... I can build an image excluding gpu dependencies by passing `--build-arg UV_EXCLUDE_GROUPS=dev,gpu`Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
configurationSettings and suchSettings and suchenhancementNew feature or improvement to existing functionalityNew feature or improvement to existing functionality