Skip to content
This repository has been archived by the owner on Feb 6, 2024. It is now read-only.

Commit

Permalink
Mark stamper and reverser as python 3 (#531)
Browse files Browse the repository at this point in the history
* Mark stamper and reverser as python 3

* Switch host force flags to python 3

* buildifier
  • Loading branch information
smukherj1 authored Feb 25, 2020
1 parent 8e743dd commit 0a9e6d7
Show file tree
Hide file tree
Showing 4 changed files with 12 additions and 3 deletions.
6 changes: 3 additions & 3 deletions .bazelrc
Original file line number Diff line number Diff line change
Expand Up @@ -21,9 +21,9 @@ test --test_output=errors --workspace_status_command="bash print-workspace-statu
# Also, force host binaries to use py2.
# Note these flags will only work with Bazel 0.25.0 or above.
build --incompatible_use_python_toolchains
build --host_force_python=PY2
build --host_force_python=PY3
test --incompatible_use_python_toolchains
test --host_force_python=PY2
test --host_force_python=PY3
run --incompatible_use_python_toolchains
run --host_force_python=PY2
run --host_force_python=PY3

4 changes: 4 additions & 0 deletions k8s/BUILD
Original file line number Diff line number Diff line change
Expand Up @@ -33,13 +33,17 @@ par_binary(
name = "stamper",
srcs = ["stamper.py"],
main = "stamper.py",
python_version = "PY3",
srcs_version = "PY3",
visibility = ["//visibility:public"],
)

par_binary(
name = "reverser",
srcs = ["reverser.py"],
main = "reverser.py",
python_version = "PY3",
srcs_version = "PY3",
visibility = ["//visibility:public"],
deps = select({
"@bazel_tools//tools/python:PY2": ["@com_github_yaml_pyyaml//:yaml"],
Expand Down
2 changes: 2 additions & 0 deletions k8s/reverser.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,8 @@
# limitations under the License.
"""Reverses the object order in a multi-document yaml."""

from __future__ import absolute_import
from __future__ import division
from __future__ import print_function

import argparse
Expand Down
3 changes: 3 additions & 0 deletions k8s/stamper.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,9 @@
# limitations under the License.
"""Resolve stamp variables."""

from __future__ import absolute_import
from __future__ import division
from __future__ import print_function
import argparse
import sys

Expand Down

0 comments on commit 0a9e6d7

Please sign in to comment.