brash-baker-91190
03/03/2021, 2:40 PMpulumi CLI is a Go binary, but to execute our infrastructure program written in Python, it needs to be invoked from inside a virtualenv with the right dependencies. Is there some kind of way for Pants to create such an environment for me, and then "get out of my way" and let me execute arbitrary pulumi commands in that environment? I see there's a pants run command, but that looks like it's for executing Pex binaries. Can that be adapted for my usecase, or is there another way? Thanks 🙇jolly-midnight-72759
03/03/2021, 2:44 PMpants run but with the final step being to kick off pulumi. The plugin would create the virtual env based on your target(s). I am not familiar with pulumi but if it is triggered by a simple command, this should be fairly simple to create.jolly-midnight-72759
03/03/2021, 2:45 PMjolly-midnight-72759
03/03/2021, 2:45 PMbrash-baker-91190
03/03/2021, 2:49 PMenough-analyst-54434
03/03/2021, 3:09 PMpex_binary wants `execution_mode=venv`: https://www.pantsbuild.org/v2.3/docs/reference-pex_binary#codeexecution_modecodebrash-baker-91190
03/03/2021, 3:14 PMpulumi binary. I'm just looking for a way for Pants to handle that part so engineers don't have to remember that, while the rest of the Python code in our repo is handled by Pants, this one special bit of Python code isn't, and you'll have to manually curate your environment.brash-baker-91190
03/03/2021, 3:16 PMenough-analyst-54434
03/03/2021, 3:18 PMPEX_TOOLS=1 ./my.pex venv right/here. That will turn ./my.pex into a venv right/here. Does that work minus the need to run ./pants package and then run PEX_TOOLS=1 dist/.../my.pex ...?enough-analyst-54434
03/03/2021, 3:19 PMsource right/here/bin/activatebrash-baker-91190
03/03/2021, 3:23 PMrequirements.txt file for this corner of code, correct? (in addition to allowing me to pull in arbitrary dependencies from elsewhere in our repo, which may be required soon). It sounds like about the same amount of work to get the environment set up, but is at least "Pants-native", so that seems like a nice incremental improvement. Do I have that all about right?enough-analyst-54434
03/03/2021, 3:24 PMbrash-baker-91190
03/03/2021, 3:27 PMenough-analyst-54434
03/03/2021, 3:27 PMbrash-baker-91190
03/03/2021, 3:30 PMlimited-insurance-37393
03/10/2021, 6:31 PM