How to allow bazel python tests to use user site packages?

59 views
Skip to first unread message

kumuthi...@gmail.com

unread,
Nov 30, 2018, 11:26:48 AM11/30/18
to Bazel/Python Special Interest Group
Is there a way to allow my python test to use the user site packages?

That is, packages in PYTHONUSERBASE (https://docs.python.org/3/using/cmdline.html#envvar-PYTHONUSERBASE) ?

Thanks.

Paweł Stradomski

unread,
Dec 3, 2018, 8:01:15 AM12/3/18
to kumuthi...@gmail.com, bazel-si...@googlegroups.com
Note that would be non-hermetic, so potentially a bad idea. 

But, anyway: I'm not sure about PYTHONUSERBASE, but I've been using virtualenv and it just worked. I had activated the virtualenv first, then run bazel and the tests just used the packages.

Do you use non-standard PYTHONUSERBASE? In this case you can try passing --test_env=PYTHONUSERBASE=/foo/bar to the tests and see if it helps.


--
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/780db90e-b39e-43b1-bf93-a69a684ea1f7%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


--
Paweł Stradomski
Reply all
Reply to author
Forward
0 new messages