diff --git a/.bazelrc b/.bazelrc index da85fd9e157..14edaddeae4 100644 --- a/.bazelrc +++ b/.bazelrc @@ -27,6 +27,9 @@ build --workspace_status_command=./tools/workspace_status.sh # TODO(b/315853820): Needed for Bazel 7.0, until migrated to bzlmod build --noenable_bzlmod +# TODO(b/315853820): Needed for Bazel 8.0, until migrated to bzlmod +build --enable_workspace + # Use the following C++ standard build --cxxopt -std=c++17 diff --git a/.bazelversion b/.bazelversion index 66ce77b7ead..e7fdef7e2e6 100644 --- a/.bazelversion +++ b/.bazelversion @@ -1 +1 @@ -7.0.0 +8.4.2 diff --git a/WORKSPACE b/WORKSPACE index 998e040c2f0..3769ea6bb0f 100644 --- a/WORKSPACE +++ b/WORKSPACE @@ -19,6 +19,11 @@ load("//tensorflow:workspace.bzl", "workspace") workspace() +# init for bazel_skylib +load("@bazel_skylib//:workspace.bzl", "bazel_skylib_workspace") + +bazel_skylib_workspace() + # init for rules_shell load("@rules_shell//shell:repositories.bzl", "rules_shell_dependencies", "rules_shell_toolchains") @@ -40,13 +45,11 @@ load("@hedron_compile_commands//:workspace_setup.bzl", "hedron_compile_commands_ hedron_compile_commands_setup() -_rules_python_version = "0.26.0" - http_archive( name = "rules_python", - sha256 = "9d04041ac92a0985e344235f5d946f71ac543f1b1565f2cdbc9a2aaee8adf55b", - strip_prefix = "rules_python-{}".format(_rules_python_version), - url = "https://github.com/bazelbuild/rules_python/archive/refs/tags/{}.tar.gz".format(_rules_python_version), + sha256 = "2f5c284fbb4e86045c2632d3573fc006facbca5d1fa02976e89dc0cd5488b590", + strip_prefix = "rules_python-1.6.3", + url = "https://github.com/bazel-contrib/rules_python/releases/download/1.6.3/rules_python-1.6.3.tar.gz", ) load("@rules_python//python:repositories.bzl", "py_repositories") diff --git a/tensorflow/lite/micro/examples/person_detection/BUILD b/tensorflow/lite/micro/examples/person_detection/BUILD index 8b368a677f4..b630f30b622 100644 --- a/tensorflow/lite/micro/examples/person_detection/BUILD +++ b/tensorflow/lite/micro/examples/person_detection/BUILD @@ -25,6 +25,13 @@ tflm_cc_library( ], ) +filegroup( + name = "testdata_files", + srcs = glob(["testdata/**"]), + visibility = ["//visibility:public"], +) + + generate_cc_arrays( name = "generated_no_person_bmp_cc", src = "testdata/no_person.bmp", diff --git a/tensorflow/lite/micro/examples/person_detection/utils/BUILD b/tensorflow/lite/micro/examples/person_detection/utils/BUILD index bd279ae30ce..ca33f6e699f 100644 --- a/tensorflow/lite/micro/examples/person_detection/utils/BUILD +++ b/tensorflow/lite/micro/examples/person_detection/utils/BUILD @@ -25,7 +25,7 @@ py_library( py_test( name = "raw_to_bitmap_test", srcs = ["raw_to_bitmap_test.py"], - data = glob(["testdata/**"]), + data = ["//tensorflow/lite/micro/examples/person_detection:testdata_files"], tags = [ "nomicro_static", # TF dep incompatible w/ TF_LITE_STATIC_MEMORY. "notap", # TODO(b/186679612) diff --git a/tensorflow/workspace.bzl b/tensorflow/workspace.bzl index 2fdff77067b..e22b1aed3ce 100644 --- a/tensorflow/workspace.bzl +++ b/tensorflow/workspace.bzl @@ -20,10 +20,10 @@ def tf_repositories(path_prefix = "", tf_repo_name = ""): # https://github.com/bazelbuild/bazel-skylib/releases tf_http_archive( name = "bazel_skylib", - sha256 = "1dde365491125a3db70731e25658dfdd3bc5dbdfd11b840b3e987ecf043c7ca0", + sha256 = "6e78f0e57de26801f6f564fa7c4a48dc8b36873e416257a92bbb0937eeac8446", urls = [ - "https://storage.googleapis.com/mirror.tensorflow.org/github.com/bazelbuild/bazel-skylib/releases/download/0.9.0/bazel_skylib-0.9.0.tar.gz", - "https://github.com/bazelbuild/bazel-skylib/releases/download/0.9.0/bazel_skylib-0.9.0.tar.gz", + "https://mirror.bazel.build/github.com/bazelbuild/bazel-skylib/releases/download/1.8.2/bazel-skylib-1.8.2.tar.gz", + "https://github.com/bazelbuild/bazel-skylib/releases/download/1.8.2/bazel-skylib-1.8.2.tar.gz", ], )