Closed chrisirhc closed 2 months ago
It seems like there should be a way to pass a constraint to the toolchain resolution, I’m just unsure how to do it.
It seems like there should be a way to pass a constraint to the toolchain resolution, I’m just unsure how to do it.
I'm not sure how to do it either, though our use of rules_uv requires multiple pip_compile rules with a different version of python for each of them. This seems to work well in our use case since we'd need to specify a different runtime for the non-default python toolchain.
I'm also not sure how to add tests for this.
Thanks -- this seems like something we can/should be able to get help for on Bazel slack, I'll start a thread.
Added an example of usage in the PR description to help with the conversation/thread.
seems like this will be super nice for projects that support multiple py versions where the default is not the lowest supported version
Could use some help and opinions on the attribute name. This does add rules_python as a bazel dep in order to use the
PyRuntimeInfo
provider. Not sure if that's undesirable. It seems to make sense since rules_uv already depends on the toolchain made available by it.Example usage:
Fixes #97