here's my setup:
WORSPACE
```
git_repository(
name = "io_bazel_rules_python",
remote = "https://github.com/bazelbuild/rules_python.git",
commit = "fa77c9c1118380e066c88b955c90fb3c7353429e",
)
# I'm trying to use the default python rules because I want to be able to use the new pip-install rules
```
BUILD
```
py_runtime(
name = "python-3.5.2",
files = [],
interpreter_path = "/usr/bin/python3",
)
## smoketest
py_binary(
name = "smoketest",
default_python_version = "PY3",
srcs_version = "PY3ONLY",
srcs = ["smoketest.py"],
)
```
This happily compiles and runs, but even though everything says PY3, it's running python2.
Is there a way to tell the py_binary to use the py_runtime that was created above it? deps= didn't work.
The docs say that srcs_version has been deprecated and "no longer has effect" but before I added that in, I got an error from 2to3.
Unless there's an easy way I'm probably just going to go back to using the pex_binary rule, because that works even though it doesn't cache pip dependencies.
I would really love to figure out how to make this work. bazel_pex has its own problems.
This is with bazel 0.5.4 on an ubuntu image.I would really love to figure out how to make this work. bazel_pex has its own problems.
--
You received this message because you are subscribed to the Google Groups "bazel-discuss" group.
To unsubscribe from this group and stop receiving emails from it, send an email to bazel-discus...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/bazel-discuss/c63282a5-6832-4451-85a0-0bb5af3bf9dc%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
To view this discussion on the web visit https://groups.google.com/d/msgid/bazel-discuss/66afc049-b45e-4400-815c-8fc5e6cc9403%40googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/bazel-discuss/1fbc0454-48e9-4d47-8f87-d8c9dc92163f%40googlegroups.com.