Skip to content

pip_parse is burdensome for downstream projects #608

@pauldraper

Description

@pauldraper

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.

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions