theoremlp / rules_uv

Bazel rules for running uv
Apache License 2.0
31 stars 14 forks source link

Add support for multiple input files #86

Open keith opened 1 month ago

keith commented 1 month ago

uv supports passing any number of requirements.in files, and also any number of pyproject.toml files. This can be useful if your dependencies are split across multiple tools that are consumed in other ways, so you don't want to duplicate their requirements. I haven't tried but it looks like I could potentially hack this with data + args, but I think it would be nice if this was supported.

mark-thm commented 1 month ago

We support including additional files in data, but the assumption is that you use -r or -c lines in some primary constraint file.

mark-thm commented 1 month ago

See also https://github.com/theoremlp/rules_uv/tree/main/examples/multiple-inputs

keith commented 1 month ago

oh ok, good to know that's what data is for. does -r / -c support using a pyproject.toml file?

mark-thm commented 1 month ago

I haven't spent much time with the docs -- if you want there to be multiple input constraint files and for them all to automatically show up in the command, I think that's something we can easily grow these rules to do.