Skip to content

Commit 3b7aa3e

Browse files
authored
Update dependencies (#22)
Looks like we've run out of time with the old versions of rules_python and rules_pkg for Bazel. Update these and freeze our Python dependencies (a new default requirement for rules_python it seems).
1 parent bac75b8 commit 3b7aa3e

File tree

4 files changed

+31
-30
lines changed

4 files changed

+31
-30
lines changed

BUILD

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
load("@rules_python//python:defs.bzl", "py_binary", "py_library")
2-
load("@pip//:requirements.bzl", "requirement")
2+
load("@pip_deps//:requirements.bzl", "requirement")
33
load("@rules_pkg//:pkg.bzl", "pkg_deb", "pkg_tar")
44

55
py_library(

WORKSPACE

Lines changed: 14 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -3,44 +3,32 @@ load("@bazel_tools//tools/build_defs/repo:http.bzl", "http_archive")
33
# Python rules.
44
http_archive(
55
name = "rules_python",
6-
url = "https://github.com/bazelbuild/rules_python/releases/download/0.1.0/rules_python-0.1.0.tar.gz",
7-
sha256 = "b6d46438523a3ec0f3cead544190ee13223a52f6a6765a29eae7b7cc24cc83a0",
6+
sha256 = "a868059c8c6dd6ad45a205cca04084c652cfe1852e6df2d5aca036f6e5438380",
7+
strip_prefix = "rules_python-0.14.0",
8+
url = "https://github.com/bazelbuild/rules_python/archive/refs/tags/0.14.0.tar.gz",
89
)
910

10-
load("@rules_python//python:pip.bzl", "pip_install")
11+
load("@rules_python//python:pip.bzl", "pip_parse")
1112

12-
pip_install(
13-
# (Optional) You can provide extra parameters to pip.
14-
# Here, make pip output verbose (this is usable with `quiet = False`).
15-
#extra_pip_args = ["-v"],
16-
17-
# (Optional) You can exclude custom elements in the data section of the generated BUILD files for pip packages.
18-
# Exclude directories with spaces in their names in this example (avoids build errors if there are such directories).
19-
#pip_data_exclude = ["**/* */**"],
13+
pip_parse(
14+
name = "pip_deps",
15+
requirements_lock = "//:requirements.txt",
16+
)
2017

21-
# (Optional) You can provide a python_interpreter (path) or a python_interpreter_target (a Bazel target, that
22-
# acts as an executable). The latter can be anything that could be used as Python interpreter. E.g.:
23-
# 1. Python interpreter that you compile in the build file (as above in @python_interpreter).
24-
# 2. Pre-compiled python interpreter included with http_archive
25-
# 3. Wrapper script, like in the autodetecting python toolchain.
26-
#python_interpreter_target = "@python_interpreter//:python_bin",
18+
load("@pip_deps//:requirements.bzl", "install_deps")
2719

28-
# (Optional) You can set quiet to False if you want to see pip output.
29-
#quiet = False,
20+
install_deps()
3021

31-
# Uses the default repository name "pip"
32-
requirements = "//:requirements.txt",
33-
)
3422

3523
# Packaging rules.
3624
#load("@bazel_tools//tools/build_defs/repo:http.bzl", "http_archive")
3725
http_archive(
3826
name = "rules_pkg",
3927
urls = [
40-
"https://mirror.bazel.build/github.com/bazelbuild/rules_pkg/releases/download/0.4.0/rules_pkg-0.4.0.tar.gz",
41-
"https://github.com/bazelbuild/rules_pkg/releases/download/0.4.0/rules_pkg-0.4.0.tar.gz",
28+
"https://mirror.bazel.build/github.com/bazelbuild/rules_pkg/releases/download/0.8.0/rules_pkg-0.8.0.tar.gz",
29+
"https://github.com/bazelbuild/rules_pkg/releases/download/0.8.0/rules_pkg-0.8.0.tar.gz",
4230
],
43-
sha256 = "038f1caa773a7e35b3663865ffb003169c6a71dc995e39bf4815792f385d837d",
31+
sha256 = "eea0f59c28a9241156a47d7a8e32db9122f3d50b505fae0f33de6ce4d9b61834",
4432
)
4533
load("@rules_pkg//:deps.bzl", "rules_pkg_dependencies")
46-
rules_pkg_dependencies()
34+
rules_pkg_dependencies()

misc/BUILD

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
load("@rules_python//python:defs.bzl", "py_binary", "py_library")
2-
load("@pip//:requirements.bzl", "requirement")
2+
load("@pip_deps//:requirements.bzl", "requirement")
33
load("@rules_pkg//:pkg.bzl", "pkg_deb", "pkg_tar")
44

55
py_binary(

requirements.txt

Lines changed: 15 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,15 @@
1-
prometheus_client
2-
libdyson
1+
async-timeout==4.0.2
2+
attrs==22.1.0
3+
certifi==2022.9.24
4+
cffi==1.15.1
5+
charset-normalizer==2.1.1
6+
cryptography==38.0.3
7+
idna==3.4
8+
ifaddr==0.2.0
9+
libdyson==0.8.11
10+
paho-mqtt==1.6.1
11+
prometheus-client==0.15.0
12+
pycparser==2.21
13+
requests==2.28.1
14+
urllib3==1.26.13
15+
zeroconf==0.39.4

0 commit comments

Comments
 (0)