I have python scripts that run `pants` commands, i...
# general
h
I have python scripts that run
pants
commands, ideally I’d like to run these via
pants run
like the rest of my targets. This requires setting
PANTS_CONCURRENT=True
to function, but a workaround is to build and run separately e.g.
Copy code
pants package <pex_target>
python3 dist/pex_target.pex
Can I reach anything equivalent whilst still running via
pants run
? The execution_mode options for
pex_binary
don’t enable this, but maybe something else does.
f
Maybe this PR would be helpful? https://github.com/pantsbuild/pants/pull/22418
It's a proof of concept; I don't like the API but it does let
run
release the concurrency lock.
h
I like the idea of the
--loop
option allowing for explicitly telling the Pants runtime to detach itself mentioned in https://github.com/pantsbuild/pants/issues/20642.