Skip to content

uv sync isn't able to install dynamic extra dependencies #8071

@falckt

Description

@falckt

Setuptools supports dynamic optional requirements, see here for an example.

When running uv sync --extra <optional> or uv sync --all-extras these optional dependencies are not collected. Running uv pip install .[<optional>] does work though.

MWE

> git clone https://github.com/kornia/kornia.git
> cd kornia
> uv sync --extra dev
Using CPython 3.11.9 interpreter at: /home/ubuntu/.local/share/mise/installs/python/3.11/bin/python
Creating virtual environment at: .venv
Resolved 25 packages in 492ms
Installed 25 packages in 224ms
[...]

> uv pip install ".[dev]"
Resolved 60 packages in 791ms
Uninstalled 1 package in 0.42ms
Installed 36 packages in 226ms
 + accelerate==1.0.0
 + certifi==2024.8.30
 + cfgv==3.4.0
 + charset-normalizer==3.4.0
 + coverage==7.6.2
[...]

I tested this using uv 0.4.20 on ubuntu 22.04 running on x86_64.

Metadata

Metadata

Assignees

Labels

bugSomething isn't working

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions