rules_pip: update to new version
rules_pip has a new version [1] of their rule system, incompatible with the
version we used, that fixes a bunch of issues, notably:
- explicit tagging of repositories for PY2/PY3/PY23 support
- removal of dependency on host pip (in exchange for having to vendor
wheels)
- higher quality tooling for locking
We update to the newer version of pip_rules, rename the external
repository to pydeps and move requirements.txt, the lockfile and the
newly vendored wheels to third_party/, where they belong.
[1] - https://github.com/apt-itude/rules_pip/issues/16
Change-Id: I1065ee2fc410e52fca2be89fcbdd4cc5a4755d55
diff --git a/WORKSPACE b/WORKSPACE
index 47e7d02..a1b2b2c 100644
--- a/WORKSPACE
+++ b/WORKSPACE
@@ -1,3 +1,7 @@
+workspace(
+ name = "hscloud",
+)
+
load("@bazel_tools//tools/build_defs/repo:git.bzl", "git_repository")
load("@bazel_tools//tools/build_defs/repo:http.bzl", "http_archive")
@@ -18,6 +22,7 @@
name = "subpar",
remote = "https://github.com/q3k/subpar",
commit = "5dd9fb4586616c69df9b3f5aba12f08f85d708d1",
+ shallow_since = "1563277890 +0200",
)
# Docker rules
@@ -50,6 +55,7 @@
name = "io_tweag_rules_nixpkgs",
strip_prefix = "rules_nixpkgs-364adc70f32c2b3982995fce06b334f4d159070e",
urls = ["https://github.com/tweag/rules_nixpkgs/archive/364adc70f32c2b3982995fce06b334f4d159070e.tar.gz"],
+ sha256 = "59cdaf64efe9391152564ccb670bd6976168fe1426ae8b9b2f676caef03a6849",
)
# Nix packages
@@ -71,7 +77,7 @@
git_repository(
name = "com_apt_itude_rules_pip",
- commit = "ce667087818553cdc4b1a2258fc53df917c4f87c",
+ commit = "186bade4f054c0a9be7037585584c9c572cba483",
remote = "https://github.com/apt-itude/rules_pip.git",
)
@@ -83,11 +89,14 @@
load("@com_apt_itude_rules_pip//rules:repository.bzl", "pip_repository")
pip_repository(
- name = "pip36",
- python_interpreter = "python3.6",
- requirements = "//pip:requirements-linux.txt",
+ name = "pydeps",
+ requirements = "//third_party/py:requirements-lock.json",
)
+load("@pydeps//:requirements.bzl", "pip_install")
+
+pip_install()
+
# stackb/rules_proto (for Python proto compilation)
http_archive(
name = "build_stack_rules_proto",
@@ -183,6 +192,7 @@
name = "com_googlesource_gerrit_bazlets",
remote = "https://gerrit.googlesource.com/bazlets",
commit = "8528a0df69dadf6311d8d3f81c1b693afda8bcf1",
+ shallow_since = "1560842141 +0200",
)
load(