Users can set the field `output_path` (`OutputPath...
# plugins
h
Users can set the field
output_path
(
OutputPathField
from
pants.core.goals.package
). Outside of users rewriting their BUILD files, there are two alternative approaches you can use in your plugin: 1. Use
dataclasses.replace()
on the
PackageFieldSet
objects that were resolved to replace the
output_path: OutputPathField
property. This is pretty hacky though - you can’t be sure that every single implementer of the
package
goal has implemented this field and put it in the
FieldSet
thing, and using that same attribute name of
output_path
2. After resolving the
packages
, each of the
BuiltPackage
will have a
digest: Digest
. You can use
RemovePrefix
on these to post-process the results (I don’t think
output_path
was added yet in b3 though)