rules_python
rules_python copied to clipboard
Update `compile_pip_requirements` to support `requirements.in` files from multiple external repositories
🚀 feature request
Relevant Rules
Description
I have some external repositories that have some rules backed by python targets and have some requirements. Instead of needing to create multiple pip_parse or pip_install repositories, I would like to generate a requirements.txt file that has all the necessary packages so I don't end up downloading things multiple times.
Describe the solution you'd like
I would like to be able to pass the requirements.in files to compile_pip_requirements and have that inject them as -r {requirements} before compiling.
compile_pip_requirements(
name = "requirements",
extra_args = ["--allow-unsafe"],
requirements_in = "requirements.in",
requirements_txt = "requirements.txt",
external_requirements = [
"@tool_a//:requirements.in",
"@tool_b//:requirements.in",
"@tool_c//:requirements.in",
],
)
Describe alternatives you've considered
Have you considered any alternative solutions or workarounds?Open to ideas but I'd like to easily be able to merge other sets of requirements into one collection (which is one of the benefits of being able to compile a locked requirements.txt file).
Do I recall correctly that @mattem had sketched up a potential solution once upon a time?
This issue has been automatically marked as stale because it has not had any activity for 180 days. It will be closed if no further activity occurs in 30 days. Collaborators can add an assignee to keep this open indefinitely. Thanks for your contributions to rules_python!
This issue was automatically closed because it went 30 days without a reply since it was labeled "Can Close?"
This is still desired.
I don't think rules_python gets so many issues that this bot needs to continually close them. This functionality should be disabled.