diff --git a/WORKSPACE.bazel b/WORKSPACE.bazel index 0dfe77ee..e3153183 100644 --- a/WORKSPACE.bazel +++ b/WORKSPACE.bazel @@ -20,6 +20,7 @@ workspace(name = "com_google_nisaba") +load("@bazel_tools//tools/build_defs/repo:git.bzl", "git_repository") load("@bazel_tools//tools/build_defs/repo:http.bzl", "http_archive") # ------------------------------------------------------------------------- @@ -27,20 +28,10 @@ load("@bazel_tools//tools/build_defs/repo:http.bzl", "http_archive") # https://github.com/protocolbuffers/protobuf # ------------------------------------------------------------------------- -# TODO: Version `21.12` is the last released version that works with -# `py_proto_library`. The latest current `22.3` is broken. Unfortunately, this -# version does not support absl::Cord for ZeroOutputStream. -# -# On the hack below see https://github.com/protocolbuffers/protobuf/issues/12523. - -protobuf_commit = "bc127f2b5605e5454d1c15d3325ecdd5ceaad6cf" - -http_archive( +git_repository( name = "com_google_protobuf", - strip_prefix = "protobuf-%s" % protobuf_commit, - patches = ["//:bazel/protobuf.patch"], - urls = ["https://github.com/protocolbuffers/protobuf/archive/%s.tar.gz" % - protobuf_commit], + remote = "https://github.com/protocolbuffers/protobuf.git", + tag = "v4.24.3", ) # Import external protobuf dependencies into this workspace. @@ -53,11 +44,14 @@ protobuf_deps() http_archive( name = "rules_python", - sha256 = "94750828b18044533e98a129003b6a68001204038dc4749f40b195b24c38f49f", - strip_prefix = "rules_python-0.21.0", - url = "https://github.com/bazelbuild/rules_python/archive/refs/tags/0.21.0.tar.gz", + url = "https://github.com/bazelbuild/rules_python/releases/download/0.25.0/rules_python-0.25.0.tar.gz", + sha256 = "5868e73107a8e85d8f323806e60cad7283f34b32163ea6ff1020cf27abef6036", + strip_prefix = "rules_python-0.25.0", ) +load("@rules_python//python:repositories.bzl", "py_repositories") +py_repositories() + # ------------------------------------------------------------------------- # Google testing framework. See # https://github.com/google/googletest @@ -69,17 +63,6 @@ http_archive( urls = ["https://github.com/google/googletest/archive/main.zip"], ) -# ------------------------------------------------------------------------- -# Google foundation C++ classes. See -# https://github.com/abseil/abseil-cpp -# ------------------------------------------------------------------------- - -http_archive( - name = "com_google_absl", - strip_prefix = "abseil-cpp-master", - urls = ["https://github.com/abseil/abseil-cpp/archive/master.zip"], -) - # ------------------------------------------------------------------------- # Thrax: This repo is only used to retrieve some of the build rules for # grammar manipulation. See @@ -133,9 +116,9 @@ install_deps() http_archive( name = "rules_cc", - sha256 = "35f2fb4ea0b3e61ad64a369de284e4fbbdcdba71836a5555abb5e194cf119509", - strip_prefix = "rules_cc-624b5d59dfb45672d4239422fa1e3de1822ee110", - urls = ["https://github.com/bazelbuild/rules_cc/archive/624b5d59dfb45672d4239422fa1e3de1822ee110.tar.gz"], + urls = ["https://github.com/bazelbuild/rules_cc/releases/download/0.0.9/rules_cc-0.0.9.tar.gz"], + sha256 = "2037875b9a4456dce4a79d112a8ae885bbc4aad968e6587dca6e64f3a0900cdf", + strip_prefix = "rules_cc-0.0.9", ) load("@rules_cc//cc:repositories.bzl", "rules_cc_dependencies") diff --git a/bazel/protobuf.patch b/bazel/protobuf.patch deleted file mode 100644 index c916cc65..00000000 --- a/bazel/protobuf.patch +++ /dev/null @@ -1,29 +0,0 @@ ---- python/internal.bzl -+++ python/internal.bzl -@@ -1,5 +1,11 @@ - # Internal helpers for building the Python protobuf runtime. - -+def _remove_cross_repo_path(path): -+ parts = path.split('/') -+ if parts[0] == '..': -+ return '/'.join(parts[2:]) -+ return path -+ - def _internal_copy_files_impl(ctx): - strip_prefix = ctx.attr.strip_prefix - if strip_prefix[-1] != "/": -@@ -7,10 +13,11 @@ def _internal_copy_files_impl(ctx): - - src_dests = [] - for src in ctx.files.srcs: -- if src.short_path[:len(strip_prefix)] != strip_prefix: -+ short_path = _remove_cross_repo_path(src.short_path) -+ if short_path[:len(strip_prefix)] != strip_prefix: - fail("Source does not start with %s: %s" % -- (strip_prefix, src.short_path)) -- dest = ctx.actions.declare_file(src.short_path[len(strip_prefix):]) -+ (strip_prefix, short_path)) -+ dest = ctx.actions.declare_file(short_path[len(strip_prefix):]) - src_dests.append([src, dest]) - - if ctx.attr.is_windows: diff --git a/requirements.txt b/requirements.txt index f4d9d959..8a8ea62f 100644 --- a/requirements.txt +++ b/requirements.txt @@ -1,13 +1,13 @@ # -# This file is autogenerated by pip-compile with python 3.10 -# To update, run: +# This file is autogenerated by pip-compile with Python 3.11 +# by the following command: # # bazel run //:requirements.update # networkx==3.1 \ --hash=sha256:4f33f68cb2afcf86f28a45f43efc27a9386b535d567d2127f8f61d51dec58d36 \ --hash=sha256:de346335408f84de0eada6ff9fafafff9bcda11f0a0dfaa931133debb146ab61 - # via -r ./requirements.in + # via -r requirements.in numpy==1.24.3 \ --hash=sha256:0ec87a7084caa559c36e0a2309e4ecb1baa03b687201d0a847c8b0ed476a7187 \ --hash=sha256:1a7d6acc2e7524c9955e5c903160aa4ea083736fde7e91276b0e5d98e6332812 \ @@ -64,10 +64,10 @@ pandas==2.0.1 \ --hash=sha256:e09a53a4fe8d6ae2149959a2d02e1ef2f4d2ceb285ac48f74b79798507e468b4 \ --hash=sha256:f25e23a03f7ad7211ffa30cb181c3e5f6d96a8e4cb22898af462a7333f8a74eb \ --hash=sha256:fe7914d8ddb2d54b900cec264c090b88d141a1eed605c9539a187dbc2547f022 - # via -r ./requirements.in + # via -r requirements.in pycountry==22.3.5 \ --hash=sha256:b2163a246c585894d808f18783e19137cb70a0c18fb36748dc01fc6f109c1646 - # via -r ./requirements.in + # via -r requirements.in python-dateutil==2.8.2 \ --hash=sha256:0123cacc1627ae19ddf3c27a5de5bd67ee4586fbdd6440d9748f8abb483d3e86 \ --hash=sha256:961d03dc3453ebbc59dbdea9e4e11c5651520a876d0f4db161e8674aae935da9 @@ -76,6 +76,10 @@ pytz==2023.3 \ --hash=sha256:1d8ce29db189191fb55338ee6d0387d82ab59f3d00eac103412d64e0ebd0c588 \ --hash=sha256:a151b3abb88eda1d4e34a9814df37de2a80e301e68ba0fd856fb9b46bfbbbffb # via pandas +setuptools==67.7.2 \ + --hash=sha256:23aaf86b85ca52ceb801d32703f12d77517b2556af839621c641fca11287952b \ + --hash=sha256:f104fa03692a2602fa0fec6c6a9e63b6c8a968de13e17c026957dd1f53d80990 + # via pycountry six==1.16.0 \ --hash=sha256:1e61c37477a1626458e36f7b1d82aa5c9b094fa4802892072e49de9c60c4c926 \ --hash=sha256:8abb2f1d86890a2dfb989f9a77cfcfd3e47c2a354b01111771326f8aa26e0254 @@ -84,9 +88,3 @@ tzdata==2023.3 \ --hash=sha256:11ef1e08e54acb0d4f95bdb1be05da659673de4acbd21bf9c69e94cc5e907a3a \ --hash=sha256:7e65763eef3120314099b6939b5546db7adce1e7d6f2e179e3df563c70511eda # via pandas - -# The following packages are considered to be unsafe in a requirements file: -setuptools==67.7.2 \ - --hash=sha256:23aaf86b85ca52ceb801d32703f12d77517b2556af839621c641fca11287952b \ - --hash=sha256:f104fa03692a2602fa0fec6c6a9e63b6c8a968de13e17c026957dd1f53d80990 - # via pycountry