Python 2 or 3 in the same workspace

147 views
Skip to first unread message

adam.d...@shield.ai

unread,
Aug 29, 2018, 3:16:43 PM8/29/18
to Bazel/Python Special Interest Group
I've been trying to support both Python2 and Python3 development in a single workspace. The documentation makes a bunch of references to target attributes to specify python version but I haven't had any luck getting them to work. It seems that `py_runtime` is supposed to be the future and I managed to get something working using it.

https://github.com/bazelbuild/bazel/issues/3517#issuecomment-417067621

I was wondering if this is the best route right now or if there's a better way to do this.

-Adam

Austin Schuh

unread,
Aug 29, 2018, 4:03:32 PM8/29/18
to adam.d...@shield.ai, Bazel/Python Special Interest Group
We are doing the same thing, but with bash instead of golang.

Austin

--
You received this message because you are subscribed to the Google Groups "Bazel/Python Special Interest Group" group.
To unsubscribe from this group and stop receiving emails from it, send an email to bazel-sig-pyth...@googlegroups.com.
To post to this group, send email to bazel-si...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/bazel-sig-python/4ac949f4-66b9-4d7a-a05c-f2bddc69bcbc%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Jon Brandvein

unread,
Aug 30, 2018, 6:00:15 PM8/30/18
to Bazel/Python Special Interest Group
As best as I can tell, the ability to use multiple Python versions in a single build was removed around


I'm consulting with our institutional memory to see what the motivation was for eliminating that. In the meantime, pushing the interpreter dispatching into a wrapper script seems like the best hack/alternative.
Reply all
Reply to author
Forward
0 new messages