rules_python icon indicating copy to clipboard operation
rules_python copied to clipboard

Update `compile_pip_requirements` to support `requirements.in` files from multiple external repositories

Open UebelAndre opened this issue 3 years ago • 1 comments

🚀 feature request

Relevant Rules

compile_pip_requirements

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).

UebelAndre avatar Feb 17 '22 17:02 UebelAndre

Do I recall correctly that @mattem had sketched up a potential solution once upon a time?

UebelAndre avatar Feb 17 '22 17:02 UebelAndre

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!

github-actions[bot] avatar Dec 11 '22 22:12 github-actions[bot]

This issue was automatically closed because it went 30 days without a reply since it was labeled "Can Close?"

github-actions[bot] avatar Jan 10 '23 22:01 github-actions[bot]

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.

UebelAndre avatar Jan 11 '23 02:01 UebelAndre