hi :wave: we've an internal tool in the monorepo t...
# general
c
hi đź‘‹ we've an internal tool in the monorepo that we want to use in a custom Pants plugin. How would you suggest to integrate this sort of tools? I could not find the best approach for this case because usually the tools used in the plugins are hosted in pip or preinstalled.
c
Have you seen “Building in-repo plugins with Pants” ? https://www.pantsbuild.org/v2.9/docs/plugins-overview#building-in-repo-plugins-with-pants Is that what you were asking about?
c
yes, but this section describes only eternal tools. in this case I want to build the pex from the code and use it in the plugin
another option could be just importing the code in the plugin and call the tool directly from python
👍 1
h
It's valid to import the code in the plugin, although I think you'll want to add the internal tool to
pantsd_invalidation_globs.add
in
GLOBAL
section (if it's not already covered by
pythonpath
option), e.g.
"path/to/**/*.py"
That makes sure that when you change your internal tool, Pantsd gets invalidated properly