https://pantsbuild.org/ logo
#general
Title
# general
b

billions-bear-56484

12/10/2021, 5:19 PM
Hey, is there a way to provide the Git python package as dependency to use it in rules? I want to generate a version for a python package, based on Git magic, but I dont get Git installed as dependency to use it in rules. 🤔
w

witty-crayon-22786

12/10/2021, 5:26 PM
that is slightly challenging to do safely: https://github.com/pantsbuild/pants/issues/13724 is a ticket for supporting it
it is possible to use thirdparty dependencies from
@rules
by adding them to your
plugins=
list in
pants.toml
. but you’d have to mark the rules that use git
@_uncacheable_rule
or, mark their return types
EngineAware.cacheable = False
b

billions-bear-56484

12/10/2021, 5:34 PM
Uh, that works! Thank you very much!
w

witty-crayon-22786

12/10/2021, 8:54 PM
great! if you have a moment, mentioning on the issue what you are using
git
for in this context would be helpful… we need to decide there how much to expose.