cuddly-window-48195
10/10/2019, 2:36 PMaloof-angle-91616
10/10/2019, 3:30 PM.transitive_invalidation_hash()
method on a PythonBinary
target object should be what you're looking for. targets have individual `.fingerprint()`s but i believe that doesn't take into account transitive deps.
(2) if you want to hash the contents of the resulting pex and use that, you could make another (cacheable) pants task which takes that hash and writes it out to disk.
let me see what we do when we build local python_dist()
targets, which create python requirements tagged with the target hashaloof-angle-91616
10/10/2019, 3:33 PMVersionedTarget
(which is a subclass of VersionedTargetSet
) from with self.invalidated()
in a
"v1" task, you can get its cache key, which is what's used in the path to that target's output in .pants.d/
aloof-angle-91616
10/10/2019, 3:33 PM.cache_key.hash
https://github.com/pantsbuild/pants/blob/d9fa07791914ccc110a33f77a4296237f4e0979e/src/python/pants/backend/python/tasks/build_local_python_distributions.py#L202aloof-angle-91616
10/10/2019, 3:34 PMcuddly-window-48195
10/10/2019, 4:10 PMaloof-angle-91616
10/10/2019, 4:12 PMaloof-angle-91616
10/10/2019, 4:13 PMcuddly-window-48195
10/10/2019, 4:17 PMaloof-angle-91616
10/10/2019, 4:18 PMcuddly-window-48195
10/10/2019, 4:18 PMaloof-angle-91616
10/10/2019, 4:18 PMaloof-angle-91616
10/10/2019, 4:19 PMaloof-angle-91616
10/10/2019, 4:19 PMaloof-angle-91616
10/10/2019, 4:20 PMcuddly-window-48195
10/10/2019, 7:41 PMcuddly-window-48195
10/10/2019, 7:42 PMaloof-angle-91616
10/10/2019, 7:42 PMaloof-angle-91616
10/10/2019, 7:43 PMcuddly-window-48195
10/10/2019, 7:43 PMcuddly-window-48195
10/10/2019, 7:50 PMaloof-angle-91616
10/11/2019, 12:58 AMaloof-angle-91616
10/11/2019, 1:15 AMcuddly-window-48195
10/11/2019, 3:05 PM