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

purple-plastic-57801

03/04/2023, 10:37 PM
Another: Can pants be used to manage a system's dependencies? Like... it installs foobar for you?
I guess one cuould use a shell command or write a plugin to do so
b

bitter-ability-32190

03/06/2023, 3:12 PM
I don't think Pants could do this well, since you usually need elevated privileges to install packages and Pants shouldn't be run with elevated privileges. That being said, I've been chipping away at a private plugin which downloads and unpacks system libraries to be used in Pants sandboxes. So the libraries aren't "installed" at all. Kinda like a really bad approximation of Docker, or
chroot
.
h

high-yak-85899

03/06/2023, 6:09 PM
If the motivation is to just simplify development, then I would agree this doesn't seem like the right tool for that. I have wanted the same thing for running tests that need more complicated dependencies (rabbitmq and java have been the latest for me). Bazel's
rules_docker
might offer some inspiration for how pants can do things. I think it just involves installing more things from source and putting it on path for execution rather than updating the system installations.
p

purple-plastic-57801

03/06/2023, 6:11 PM
Indeed. I like to just offer folx a single tool to setup and run. Currently that is a pile of Makefiles that call shell scripts, not perfect. If I'm reading the documentation correctly, I think we could just make a custom goal that runs some arbitrary things for users /shrug
5 Views