4 ms·
My impression of bazel has been the same. It makes working with polyglot tech stack a breeze. Do you have an example of the rule that strips and archives your
by lbhdc 4y ago
My impression of bazel has been the same. It makes working with polyglot tech stack a breeze.
Do you have an example of the rule that strips and archives your dependencies? Or an example of being able to invoke the python interpreter in a bazel context? I haven't seen anything like that, and want to try it out in my own project.
- aschleck 4y agoUnfortunately I can't share code at this time but I just described the archiving in more detail in a sibling comment. The Python interpreter is also quite simple. There's several ways you can do it, but the simplest thing to imagine is if you make a launcher.py script that just invokes Bash as a foreground subprocess. The pstree is kind of funky (bash -> python -> bash), but inside that shell PYTHONPATH will be set approximately correctly. There are reasons to prefer an approach that works with sourcing (eg so you can set PS1), but it's a little harder to describe. You can do some acrobatics to make runfiles (mostly) work, and my recollection is that PATH mostly works but that may require some more work. We do the same thing for Jupyterlab and IPython.