aboutsummaryrefslogtreecommitdiffhomepage
path: root/examples
diff options
context:
space:
mode:
authorGravatar Yun Peng <pcloudy@google.com>2017-03-21 10:28:13 +0000
committerGravatar Yue Gan <yueg@google.com>2017-03-21 12:54:05 +0000
commitdce45d3151742338057f88f0a459ff442e05726f (patch)
tree233b71733956b7851f81970ea8fad75c45b4eacd /examples
parentc0a84443526539c36557a6b6bfd0e41623d62fd0 (diff)
Fix python stub template for python3 on Windows
1. Adding UNC prefix after os.path.join, so that paths will be normalized and absolute. 2. Make example/py_native/bin.py work in python3 3. Add a shell test for building python binary with python3 4. Run all tests in batch mode Fix https://github.com/bazelbuild/bazel/issues/2708 -- Change-Id: I8dc18c80ebba87e965fe6fef9978732e6c35b1f0 Reviewed-on: https://cr.bazel.build/9456 PiperOrigin-RevId: 150734716 MOS_MIGRATED_REVID=150734716
Diffstat (limited to 'examples')
-rw-r--r--examples/py_native/bin.py5
1 files changed, 3 insertions, 2 deletions
diff --git a/examples/py_native/bin.py b/examples/py_native/bin.py
index 7b656278f6..45c68b26e5 100644
--- a/examples/py_native/bin.py
+++ b/examples/py_native/bin.py
@@ -1,6 +1,7 @@
+# pylint: disable=superfluous-parens
"""A tiny example binary for the native Python rules of Bazel."""
from examples.py_native.lib import GetNumber
from fib import Fib
-print "The number is %d" % GetNumber()
-print "Fib(5) == %d" % Fib(5)
+print("The number is %d" % GetNumber())
+print("Fib(5) == %d" % Fib(5))