Given that a pex is written to the PANTS_DISTDIR, ...
# general
b
Given that a pex is written to the PANTS_DISTDIR, is there a way to make it available as a resource? I need a part of the .deps directory for some packaging, but can't figure out how to make it available to a shell_command target.
f
The pex is only written to
dist
by the package goal. You should still be able to use it as an "execution dependency" for
shell_command
. https://www.pantsbuild.org/docs/reference-shell_command#codeexecution_dependenciescode
b
I've tried it but it didn't seem to work. Lemme try it again
f
There is also
runnable_dependencies
.
I am assuming that anything which can be operated on by the
package
goal can be used as an input to
shell_command
. That assumption might be wrong.
b
lemme try an experiment and I'll get back to you.
f
https://github.com/pantsbuild/pants/blob/4bb7688ba9a2d04f8951b18fda9d1500be448339/src/python/pants/core/util_rules/adhoc_process_support.py#L306 -- This is the code which allows
shell_command
to understand targets which can be packaged. So it should be possible.
b
Seems to work. I think I was in the wrong part of the chrooted environment