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

plain-river-51682

05/18/2021, 2:35 PM
Hey guys, we are currently writing some new pants plugins for pants 1.30.x. Inside those plugins we would like to use 3rdparty libraries. How can we install these? We added a BUILD file into the plugin root directory, but it doesnt seem to load the dependency
Copy code
python_library(
  name = 'plugin',
  dependencies=[
    '3rdparty/python:pyhocon',
  ]
)
e

enough-analyst-54434

05/18/2021, 2:56 PM
I don't think this is documented anywhere, but the
[GLOBAL] plugins
option is a list of requirement strings. Nominally this is intended for fetching Pants 3rdparty plugin distributions, but it can also just fetch non Pants plugins too. So, although it does not accept target addresses, you can use "pyhocon..." where "pyhocon..." Is the same requirement string you define over in 3rdparty/python:pyhocon. Not ideal, but that should work.
p

plain-river-51682

05/18/2021, 3:03 PM
ahh, that seems to work! thanks
b

busy-vase-39202

05/18/2021, 4:39 PM
Is this meant to be undocumented, or should it be added somewhere?
e

enough-analyst-54434

05/18/2021, 4:56 PM
It probably should be added. The v1 docs are ... I'm not sure how you edit those at this point (https://v1.pantsbuild.org). The 1.30 docs at the new pantsbuild.org are very partial - i.e.: if I were using Pants 1.30 I would never look there.
b

busy-vase-39202

05/18/2021, 7:08 PM
@hundreds-father-404 thoughts?
e

enough-analyst-54434

05/18/2021, 7:38 PM
To be clear, it should be added to v2 docs. That just would not have helped @plain-river-51682.
p

plain-river-51682

05/19/2021, 8:12 AM
yeah, I always directly go to v1. because v2 docs dont help me at all 🙂