hey folks. Would appreciate some help. Say I have...
# development
f
hey folks. Would appreciate some help. Say I have collected the sources from
sources=['directory/**/*']
of a target (I work on Debian packages). Now I can use them as I need. However, I also need to have access to the
files
and
packages
items from the target declaration. I’ve looked up how it’s done in the
archive
target: https://github.com/pantsbuild/pants/blob/916f4273d8a6c4368e5fab299ce8e5f9e238336b/src/python/pants/core/target_types.py#L458 and got it working for me. So now I have a directory with files (from
sources
); arbitrary
files
and
.pex
packages from the respective parameters in the target declaration. What I need is to place
files
and
packages
into arbitrary locations inside the
sources
. So let’s say
sources=['directory/**/*']
gave me
directory/path/here/file1.txt
and I want to place
my-project.pex
into
directory/path/here/
(let’s keep it simple and assume I know where to place the items) before passing the
digest
of
sources
into the
Process
. Is it doable and if it is, what would be the best way to achieve this?
You can use those as request objects in `await Get`s to manipulate directory trees.
f
perfect, thank you, this should help me to get started!
h