From 4e534cc03cf75df2a6d20431e15da4c5603ef374 Mon Sep 17 00:00:00 2001 From: Serge Bazanski Date: Tue, 29 Jun 2021 19:16:45 +0000 Subject: [PATCH] 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 --- WORKSPACE | 14 +++++--------- 1 file changed, 5 insertions(+), 9 deletions(-) diff --git a/WORKSPACE b/WORKSPACE index cf69f7f5..3514b01f 100644 --- a/WORKSPACE +++ b/WORKSPACE @@ -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")