polite-garden-50641
03/09/2020, 4:41 PMpip -e ~/project/my-library-folder
but for pants.toml
backend_packages2.add
polite-garden-50641
03/09/2020, 4:42 PMpolite-garden-50641
03/09/2020, 4:43 PMhundreds-father-404
03/09/2020, 4:45 PMpantsbuild/pants
and then move it over to wherever you want once you get the functionality working
To develop a new backend_package in Pants, the main thing you need is a register.py
in the directory you want, e.g. pants.backend.python.lint.my_custom_linter
. Then, add pants.backend.python.lint.my_custom_linter
to backend_packages2
But, there might be a way to do the pip -e
thing you’re referring to.
Have you seen https://www.pantsbuild.org/howto_plugin.html already?polite-garden-50641
03/09/2020, 4:53 PMhundreds-father-404
03/09/2020, 5:00 PMPYTHONPATH
to point it to your repo. See Toolchain’s ./pants_from_sources
script for how we load Pants plugins as loose source plugins, rather than pulling them from PyPI.
For example, it looks like we register ../pants/contrib/awslambda/python/src/python
on PYTHONPATH
and then we’re able to use pants.contrib.awslambda.python
in backend_packages
happy-kitchen-89482
03/09/2020, 7:07 PM