Errbot’s documentation has information on packaging for plugins and backends using setup.py. I’m a fan of using Poetry for my python projects, so I wanted to figure out how to make that work for my Errbot plugins and backends.
It ended up being more simple than I expected. Poetry has a feature to declare plugins, but the docs are for creating a plugin for poetry itself. There is a github issue about clarifying in the docs, but you can use this config for making anything that uses setup.py entry_points for plugins! For errbot, this looks something like this:
[tool.poetry.plugins."errbot.backend_plugins"]
{module} = "{python_module}:{backend class}"
So, for my err-aprs-backend, it ends up with:
[tool.poetry.plugins."errbot.backend_plugins"]
aprs = "aprs_backend:APRSBackend"
Which matches up with my aprs.plug
[Core]
Name = APRS
Module = aprs
[Documentation]
Description = Backend for APRS
You will also need to add your plug file to your include so it is packaged. I did this with:
include = ["*.plug"]
The full pyproject.toml for err-aprs-backend can be found on Github.