Update some android tools targets to use PY_BINARY_VERSION symbol
This ensures that they flip to PY3 when we update that symbol.
Work toward #10127.
RELNOTES: None
PiperOrigin-RevId: 280667765
diff --git a/tools/android/BUILD.tools b/tools/android/BUILD.tools
index caa47f2..b1bff1c 100644
--- a/tools/android/BUILD.tools
+++ b/tools/android/BUILD.tools
@@ -1,4 +1,5 @@
load("//tools/python:private/defs.bzl", "py_library", "py_binary")
+load("//tools/python:private/version.bzl", "PY_BINARY_VERSION")
package(default_visibility = ["//visibility:public"])
@@ -245,24 +246,21 @@
py_binary(
name = "instrumentation_test_check",
srcs = ["instrumentation_test_check.py"],
- # TODO(bazel-team): remove python_version = "PY2" while fixing https://github.com/bazelbuild/bazel/issues/10127.
- python_version = "PY2",
+ python_version = PY_BINARY_VERSION,
deps = ["//third_party/py/abseil"],
)
py_binary(
name = "build_incremental_dexmanifest",
srcs = [":build_incremental_dexmanifest.py"],
- # TODO(bazel-team): remove python_version = "PY2" while fixing https://github.com/bazelbuild/bazel/issues/10127.
- python_version = "PY2",
+ python_version = PY_BINARY_VERSION,
deps = [],
)
py_binary(
name = "build_split_manifest",
srcs = ["build_split_manifest.py"],
- # TODO(bazel-team): remove python_version = "PY2" while fixing https://github.com/bazelbuild/bazel/issues/10127.
- python_version = "PY2",
+ python_version = PY_BINARY_VERSION,
deps = [
"//third_party/py/abseil",
],
@@ -271,8 +269,7 @@
py_binary(
name = "incremental_install",
srcs = ["incremental_install.py"],
- # TODO(bazel-team): remove python_version = "PY2" while fixing https://github.com/bazelbuild/bazel/issues/10127.
- python_version = "PY2",
+ python_version = PY_BINARY_VERSION,
deps = [
"//third_party/py/concurrent:futures",
"//third_party/py/abseil",
@@ -282,8 +279,7 @@
py_binary(
name = "strip_resources",
srcs = ["strip_resources.py"],
- # TODO(bazel-team): remove python_version = "PY2" while fixing https://github.com/bazelbuild/bazel/issues/10127.
- python_version = "PY2",
+ python_version = PY_BINARY_VERSION,
deps = [
"//third_party/py/abseil",
],
@@ -294,8 +290,7 @@
srcs = [
"aar_native_libs_zip_creator.py",
],
- # TODO(bazel-team): remove python_version = "PY2" while fixing https://github.com/bazelbuild/bazel/issues/10127.
- python_version = "PY2",
+ python_version = PY_BINARY_VERSION,
deps = [
":junction_lib",
"//third_party/py/abseil",
@@ -305,8 +300,7 @@
py_binary(
name = "stubify_manifest",
srcs = ["stubify_manifest.py"],
- # TODO(bazel-team): remove python_version = "PY2" while fixing https://github.com/bazelbuild/bazel/issues/10127.
- python_version = "PY2",
+ python_version = PY_BINARY_VERSION,
deps = [
"//third_party/py/abseil",
],
@@ -315,8 +309,7 @@
py_binary(
name = "aar_embedded_jars_extractor",
srcs = ["aar_embedded_jars_extractor.py"],
- # TODO(bazel-team): remove python_version = "PY2" while fixing https://github.com/bazelbuild/bazel/issues/10127.
- python_version = "PY2",
+ python_version = PY_BINARY_VERSION,
deps = [
":junction_lib",
"//third_party/py/abseil",
@@ -326,8 +319,7 @@
py_binary(
name = "aar_resources_extractor",
srcs = ["aar_resources_extractor.py"],
- # TODO(bazel-team): remove python_version = "PY2" while fixing https://github.com/bazelbuild/bazel/issues/10127.
- python_version = "PY2",
+ python_version = PY_BINARY_VERSION,
deps = [
":junction_lib",
"//third_party/py/abseil",
@@ -337,8 +329,7 @@
py_binary(
name = "resource_extractor",
srcs = ["resource_extractor.py"],
- # TODO(bazel-team): remove python_version = "PY2" while fixing https://github.com/bazelbuild/bazel/issues/10127.
- python_version = "PY2",
+ python_version = PY_BINARY_VERSION,
)
py_library(