Skip to content

Support UV_NO_DEV env var #15009

@2bndy5

Description

@2bndy5

Summary

It is tedious to keep typing --no-dev on a platform that is meant for production testing only. I think it would be more convenient to respect an env var UV_NO_DEV when present. Alternatively, I would appreciate support for UV_DEFAULT_GROUPS, but that seems way more complex since it is not a simple boolean value.

Example

I want pre-commit installed when developing a project for embedded-Linux environments. But users that try the lib from an embedded-Linux env do not need any additional dependencies installed. Thus, the --no-dev option is the only way around that. I'm against removing dev from the default groups, because it may cause git to crash when the pre-commit binary executable is no longer in the venv for which uv run pre-commit install was invoked.

I have considered adding env markers on all my dependencies in my dev group. Sadly, the available markers do not provide an adequate way of identifying an embedded-Linux env. For instance, the adafruit-blinka package dynamically declares dependencies in it's setup.py for sdist (which is not ideal and only really works because of the piwheels index added to default indexes in all RPi OS).

Metadata

Metadata

Assignees

Labels

enhancementNew feature or improvement to existing functionality

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions