I’m writing a Pants plugin that does dependency in...
# general
c
I’m writing a Pants plugin that does dependency inference. It depends on the
ariadne
third-party library. I have my
BUILD
file defined as follows.
Copy code
python_requirement(name="ariadne", requirements=["ariadne==0.11.0"], resolve="pants-plugins")
python_sources(dependencies=["ariadne"], resolve="pants-plugins")
Then, in my plugin, I have the following at the top.
Copy code
import ariadne
When running
./pants dependees …
, I’m getting the following error.
Copy code
ModuleNotFoundError: No module named 'ariadne'
What am I missing here?
f
Pants does not use resolves for in-repo plugins. You need to add the dependency to the
[GLOBAL].plugins
option. https://www.pantsbuild.org/v2.16/docs/plugins-overview#in-repo-plugins
c
got it, thanks!