virtualenv -p $(which python3) test_py3_venv
bazel build --python_path=test_py3_venv/bin/python :some_deb
Traceback (most recent call last):
File "/private/var/tmp/_bazel_c4urself/ffc93e913d26536f0935179fcb6170b5/sandbox/darwin-sandbox/2/execroot/__main__/bazel-out/host/bin/external/bazel_tools/tools/build_defs/pkg/make_deb.runfiles/bazel_tools/tools/build_defs/pkg/make_deb.py", line 355, in <module>
main(FLAGS(sys.argv))
File "/private/var/tmp/_bazel_c4urself/ffc93e913d26536f0935179fcb6170b5/sandbox/darwin-sandbox/2/execroot/__main__/bazel-out/host/bin/external/bazel_tools/tools/build_defs/pkg/make_deb.runfiles/bazel_tools/tools/build_defs/pkg/make_deb.py", line 321, in main
preinst=GetFlagValue(FLAGS.preinst, False),
File "/private/var/tmp/_bazel_c4urself/ffc93e913d26536f0935179fcb6170b5/sandbox/darwin-sandbox/2/execroot/__main__/bazel-out/host/bin/external/bazel_tools/tools/build_defs/pkg/make_deb.runfiles/bazel_tools/tools/build_defs/pkg/make_deb.py", line 301, in GetFlagValue
flagvalue = flagvalue.decode('utf-8')
AttributeError: 'str' object has no attribute 'decode'
Description of the problem / feature request:
sys.argv is assumed to be bytes but is actually unicode in Python3
Feature requests: what underlying problem are you trying to solve with this feature?
using make_deb.py with Python3 like I did before this commit: (70e3c33#diff-687105bbda36ddcad584169fe214e7e1)
Bugs: what's the simplest, easiest way to reproduce this bug? Please provide a minimal example if possible.
What operating system are you running Bazel on?
MacOS 10.13
What's the output of
bazel info release?release 0.25.2
If
bazel info releasereturns "development version" or "(@Non-Git)", tell us how you built Bazel.N/A
What's the output of
git remote get-url origin ; git rev-parse master ; git rev-parse HEAD?N/A
Have you found anything relevant by searching the web?
No
Any other information, logs, or outputs that you want to share?