Skip to content

Commit cc5c24c

Browse files
brandjoncopybara-github
authored andcommitted
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
1 parent cf6528d commit cc5c24c

File tree

1 file changed

+11
-20
lines changed

1 file changed

+11
-20
lines changed

tools/android/BUILD.tools

Lines changed: 11 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
load("//tools/python:private/defs.bzl", "py_library", "py_binary")
2+
load("//tools/python:private/version.bzl", "PY_BINARY_VERSION")
23

34
package(default_visibility = ["//visibility:public"])
45

@@ -245,24 +246,21 @@ alias(
245246
py_binary(
246247
name = "instrumentation_test_check",
247248
srcs = ["instrumentation_test_check.py"],
248-
# TODO(bazel-team): remove python_version = "PY2" while fixing https://github.com/bazelbuild/bazel/issues/10127.
249-
python_version = "PY2",
249+
python_version = PY_BINARY_VERSION,
250250
deps = ["//third_party/py/abseil"],
251251
)
252252

253253
py_binary(
254254
name = "build_incremental_dexmanifest",
255255
srcs = [":build_incremental_dexmanifest.py"],
256-
# TODO(bazel-team): remove python_version = "PY2" while fixing https://github.com/bazelbuild/bazel/issues/10127.
257-
python_version = "PY2",
256+
python_version = PY_BINARY_VERSION,
258257
deps = [],
259258
)
260259

261260
py_binary(
262261
name = "build_split_manifest",
263262
srcs = ["build_split_manifest.py"],
264-
# TODO(bazel-team): remove python_version = "PY2" while fixing https://github.com/bazelbuild/bazel/issues/10127.
265-
python_version = "PY2",
263+
python_version = PY_BINARY_VERSION,
266264
deps = [
267265
"//third_party/py/abseil",
268266
],
@@ -271,8 +269,7 @@ py_binary(
271269
py_binary(
272270
name = "incremental_install",
273271
srcs = ["incremental_install.py"],
274-
# TODO(bazel-team): remove python_version = "PY2" while fixing https://github.com/bazelbuild/bazel/issues/10127.
275-
python_version = "PY2",
272+
python_version = PY_BINARY_VERSION,
276273
deps = [
277274
"//third_party/py/concurrent:futures",
278275
"//third_party/py/abseil",
@@ -282,8 +279,7 @@ py_binary(
282279
py_binary(
283280
name = "strip_resources",
284281
srcs = ["strip_resources.py"],
285-
# TODO(bazel-team): remove python_version = "PY2" while fixing https://github.com/bazelbuild/bazel/issues/10127.
286-
python_version = "PY2",
282+
python_version = PY_BINARY_VERSION,
287283
deps = [
288284
"//third_party/py/abseil",
289285
],
@@ -294,8 +290,7 @@ py_binary(
294290
srcs = [
295291
"aar_native_libs_zip_creator.py",
296292
],
297-
# TODO(bazel-team): remove python_version = "PY2" while fixing https://github.com/bazelbuild/bazel/issues/10127.
298-
python_version = "PY2",
293+
python_version = PY_BINARY_VERSION,
299294
deps = [
300295
":junction_lib",
301296
"//third_party/py/abseil",
@@ -305,8 +300,7 @@ py_binary(
305300
py_binary(
306301
name = "stubify_manifest",
307302
srcs = ["stubify_manifest.py"],
308-
# TODO(bazel-team): remove python_version = "PY2" while fixing https://github.com/bazelbuild/bazel/issues/10127.
309-
python_version = "PY2",
303+
python_version = PY_BINARY_VERSION,
310304
deps = [
311305
"//third_party/py/abseil",
312306
],
@@ -315,8 +309,7 @@ py_binary(
315309
py_binary(
316310
name = "aar_embedded_jars_extractor",
317311
srcs = ["aar_embedded_jars_extractor.py"],
318-
# TODO(bazel-team): remove python_version = "PY2" while fixing https://github.com/bazelbuild/bazel/issues/10127.
319-
python_version = "PY2",
312+
python_version = PY_BINARY_VERSION,
320313
deps = [
321314
":junction_lib",
322315
"//third_party/py/abseil",
@@ -326,8 +319,7 @@ py_binary(
326319
py_binary(
327320
name = "aar_resources_extractor",
328321
srcs = ["aar_resources_extractor.py"],
329-
# TODO(bazel-team): remove python_version = "PY2" while fixing https://github.com/bazelbuild/bazel/issues/10127.
330-
python_version = "PY2",
322+
python_version = PY_BINARY_VERSION,
331323
deps = [
332324
":junction_lib",
333325
"//third_party/py/abseil",
@@ -337,8 +329,7 @@ py_binary(
337329
py_binary(
338330
name = "resource_extractor",
339331
srcs = ["resource_extractor.py"],
340-
# TODO(bazel-team): remove python_version = "PY2" while fixing https://github.com/bazelbuild/bazel/issues/10127.
341-
python_version = "PY2",
332+
python_version = PY_BINARY_VERSION,
342333
)
343334

344335
py_library(

0 commit comments

Comments
 (0)