uv
uv copied to clipboard
`uv add -r requirements.txt`
trafficstars
Support a flag that would allow uv add to read requirements from a file, e.g. uv add -r requirements.txt. This would enable seamless migration from a requirements.txt to a pyproject.toml.
There's some issues here. We would probably have to use --raw to be useful, at least as fallback for git dependencies. We would also need to make sure not to overwrite dependencies with different markers, e.g. foo>2; python_version > '3.7' and foo<2; python_version < '3.7' should be added as expected. This is at least different from the current behavior of uv add, but arguably that should also be changed.