We would like to make the arguments into pip compile configurable for rules_uv. Specifically:
--generate-hashes
--emit-index-url
--no-strip-extras
--custom-compile-command
Description of changes
Updated docs
Extracted the logic which parses args into pip.bzl.
In order for this to work correctly, had to use an eval for the uv pip compile command in both pip_compile.sh and pip_compile_test.sh
Risks
There doesn't seem to be a lot of automated testing available using bazel test, so there may be edge cases I've missed. Particularly with the changes to the bash scripts.
Testing
Tested locally by extending the repo BUILD file with
Summary
We would like to make the arguments into pip compile configurable for rules_uv. Specifically:
--generate-hashes
--emit-index-url
--no-strip-extras
--custom-compile-command
Description of changes
pip.bzl
.uv pip compile
command in bothpip_compile.sh
andpip_compile_test.sh
Risks
There doesn't seem to be a lot of automated testing available using
bazel test
, so there may be edge cases I've missed. Particularly with the changes to the bash scripts.Testing
Tested locally by extending the repo BUILD file with
and running
bazel run //:generate_requirements_txt
Tested in a much larger private codebase using
and it works as expected for our usecase.