1
0
Fork 0

WORKSPACE: use pip_parse

This switches over to rules_python's new pip_parse remote dependency
fetching, which significantly reduces Python hell in Bazel.

Now each Python dependency gets its own external repository, which means
we don't have to build psycopg on every hscloud checkout!

Change-Id: Icc3b39197fae1046648d9a483876f5de5bd415d0
master
q3k 2021-06-29 19:16:45 +00:00 committed by q3k
parent 7a13fdbf12
commit 4e534cc03c
1 changed files with 5 additions and 9 deletions

View File

@ -48,17 +48,13 @@ http_archive(
# Python rules
# Important: rules_python must be loaded before protobuf (and grpc) because they load an older version otherwise
load("@rules_python//python:repositories.bzl", "py_repositories")
py_repositories()
load("@rules_python//python:pip.bzl", "pip_repositories")
pip_repositories()
load("@rules_python//python:pip.bzl", "pip_install")
pip_install(
load("@rules_python//python:pip.bzl", "pip_parse")
pip_parse(
name = "pydeps",
requirements = "//third_party/py:requirements.txt",
requirements_lock = "//third_party/py:requirements.txt",
)
load("@pydeps//:requirements.bzl", "install_deps")
install_deps()
# Setup Go toolchain.
load("@io_bazel_rules_go//go:deps.bzl", "go_register_toolchains")