Typically, to install an upstream project, it looks something like
http_repository(
name = "example",
# ...
)
load("@example//:workspace.bzl", "example_repositories")
example_repositories()
However, suppose example uses pip dependencies.
The install must be at minimum:
http_repository(
name = "example",
# ...
)
# create pip_parse repo
load("@example://workspace_part_1.bzl", "example_repositories_part_1")
example_repositories_part_1()
# load requirements.bzl from pip_parse repo and call install_deps()
load("@example//:workspace_part_2.bzl", "example_repositories_part_2")
example_repositories_part_2()
This looks weird, and further burdens already lengthy WORKSPACE files.
A solution is to expose generating requirements.bzl. Then the upstream project can commit that to the source tree (probably the same step as generating the requirements lock file today). And then downstream projects can initialize repos with only one step.
This allows the repository creation to happen in one step.
Typically, to install an upstream project, it looks something like
However, suppose
exampleuses pip dependencies.The install must be at minimum:
This looks weird, and further burdens already lengthy WORKSPACE files.
A solution is to expose generating requirements.bzl. Then the upstream project can commit that to the source tree (probably the same step as generating the requirements lock file today). And then downstream projects can initialize repos with only one step.
This allows the repository creation to happen in one step.