astral-sh / uv

An extremely fast Python package and project manager, written in Rust.
https://docs.astral.sh/uv
Apache License 2.0
24.67k stars 712 forks source link

`uv add` should assume `--dev` if in a virtual workspace root #6492

Closed charliermarsh closed 2 months ago

charliermarsh commented 2 months ago

I find it somewhat tedious that you have to add --dev:

❯ uv add flask
error: Found a virtual workspace root, but virtual projects do not support production dependencies (instead, use: `uv add --dev`)
TomerBin commented 2 months ago

What do you think about suggesting to add the new dependency to a specific workspace member as another solution?

zanieb commented 2 months ago

This may not be applicable if we allow virtual projects.

charliermarsh commented 2 months ago

No longer relevant as of v0.4.0 -- these "virtual workspace roots" were deprecated. Instead, users can just omit [build-system], and uv will avoid building and installing it by default (but will still resolve and include its dependencies).