Skip to content

Commit

Permalink
gvisor/bazel: use python2 to build runsc-debian
Browse files Browse the repository at this point in the history
$ bazel build runsc:runsc-debian
  File ".../bazel_tools/tools/build_defs/pkg/make_deb.py", line 311,
  in GetFlagValue:
    flagvalue = flagvalue.decode('utf-8')
AttributeError: 'str' object has no attribute 'decode'

make_deb.py is incompatible with Python3.
bazelbuild/bazel#8443

PiperOrigin-RevId: 253640180
  • Loading branch information
avagin authored and gvisor-bot committed Jun 17, 2019
1 parent 99d2863 commit 586537c
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 0 deletions.
5 changes: 5 additions & 0 deletions runsc/BUILD
Original file line number Diff line number Diff line change
Expand Up @@ -96,6 +96,11 @@ pkg_deb(
maintainer = "The gVisor Authors <gvisor-dev@googlegroups.com>",
package = "runsc",
postinst = "debian/postinst.sh",
tags = [
# runsc-debian requires python2:
# /~https://github.com/bazelbuild/bazel/issues/8443
"manual",
],
version_file = ":version.txt",
visibility = [
"//visibility:public",
Expand Down
4 changes: 4 additions & 0 deletions tools/run_tests.sh
Original file line number Diff line number Diff line change
Expand Up @@ -90,6 +90,10 @@ build_everything() {
bazel build \
-c "${FLAVOR}" "${BAZEL_BUILD_RBE_FLAGS[@]}" \
"${BUILD_PACKAGES[@]}"

# make_deb.py is incompatible with Python3.
# /~https://github.com/bazelbuild/bazel/issues/8443
bazel build --host_force_python=py2 runsc:runsc-debian
}

# Run simple tests runs the tests that require no special setup or
Expand Down

0 comments on commit 586537c

Please sign in to comment.