Skip to content

Commit

Permalink
Update Bazel to 4.2.1.
Browse files Browse the repository at this point in the history
  • Loading branch information
hawkinsp committed Dec 2, 2021
1 parent 68e9e1c commit ffb7ec1
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 15 deletions.
2 changes: 1 addition & 1 deletion .bazelversion
Original file line number Diff line number Diff line change
@@ -1 +1 @@
4.1.0
4.2.1
28 changes: 14 additions & 14 deletions build/build.py
Original file line number Diff line number Diff line change
Expand Up @@ -90,40 +90,40 @@ def check_numpy_version(python_bin_path):

# Bazel

BAZEL_BASE_URI = "https://github.com/bazelbuild/bazel/releases/download/4.1.0/"
BAZEL_BASE_URI = "https://github.com/bazelbuild/bazel/releases/download/4.2.1/"
BazelPackage = collections.namedtuple("BazelPackage",
["base_uri", "file", "sha256"])
bazel_packages = {
("Linux", "x86_64"):
BazelPackage(
base_uri=None,
file="bazel-4.1.0-linux-x86_64",
file="bazel-4.2.1-linux-x86_64",
sha256=
"0eb2e378d2782e7810753e2162245ad1179c1bb12f848c692b4a595b4edf779b"),
"1a4f3a3ce292307bceeb44f459883859c793436d564b95319aacb8af1f20557c"),
("Linux", "aarch64"):
BazelPackage(
base_uri=None,
file="bazel-4.1.0-linux-arm64",
file="bazel-4.2.1-linux-arm64",
sha256=
"b3834742166379e52b880319dec4699082cb26fa96cbb783087deedc5fbb5f2b"),
"0a849f99d59eab7058212a89b2a0d2b6a17f1ef7ba7fb7a42523a7171bb1c64f"),
("Darwin", "x86_64"):
BazelPackage(
base_uri=None,
file="bazel-4.1.0-darwin-x86_64",
file="bazel-4.2.1-darwin-x86_64",
sha256=
"2eecc3abb0ff653ed0bffdb9fbfda7b08548c2868f13da4a995f01528db200a9"),
"74d93848f0c9d592e341e48341c53c87e3cb304a54a2a1ee9cff3df422f0b23c"),
("Darwin", "arm64"):
BazelPackage(
base_uri=None,
file="bazel-4.1.0-darwin-arm64",
file="bazel-4.2.1-darwin-arm64",
sha256=
"c372d39ab9dac96f7fdfc2dd649e88b05ee4c94ce3d6cf2313438ef0ca6d5ac1"),
"f0375d77afe61a7167cd6d9cda1fde0eb29839e0ca8718002da73ea895b31dc0"),
("Windows", "AMD64"):
BazelPackage(
base_uri=None,
file="bazel-4.1.0-windows-x86_64.exe",
file="bazel-4.2.1-windows-x86_64.exe",
sha256=
"7b2077af7055b421fe31822f83c3c3c15e36ff39b69560ba2472dde92dd45b46"),
"8fa10dfdc8b2f610a8891b68e2a132540e6fac4fea62174cffd9994b9147586e"),
}


Expand Down Expand Up @@ -185,7 +185,7 @@ def get_bazel_paths(bazel_path_flag):

def get_bazel_path(bazel_path_flag):
"""Returns the path to a Bazel binary, downloading Bazel if not found. Also,
checks Bazel's version is at least newer than 4.1.0.
checks Bazel's version is at least newer than 4.2.1.
A manual version check is needed only for really old bazel versions.
Newer bazel releases perform their own version check against .bazelversion
Expand All @@ -194,11 +194,11 @@ def get_bazel_path(bazel_path_flag):
"""
for path in filter(None, get_bazel_paths(bazel_path_flag)):
version = get_bazel_version(path)
if version is not None and version >= (4, 1, 0):
if version is not None and version >= (4, 2, 1):
return path, ".".join(map(str, version))

print("Cannot find or download a suitable version of bazel."
"Please install bazel >= 4.1.0.")
"Please install bazel >= 4.2.1.")
sys.exit(-1)


Expand Down

0 comments on commit ffb7ec1

Please sign in to comment.